(props)
| 31 | |
| 32 | class MAPFVisualizer extends Component { |
| 33 | constructor(props) { |
| 34 | super(props); |
| 35 | this.state = { |
| 36 | numRow: DEFAULTROW, |
| 37 | numCol: DEFAULTCOL, |
| 38 | tempRow: DEFAULTROW, |
| 39 | tempCol: DEFAULTCOL, |
| 40 | map: new Array(DEFAULTROW).fill().map(() => |
| 41 | new Array(DEFAULTCOL).fill().map((u) => ({ |
| 42 | isWall: false, |
| 43 | isStart: false, |
| 44 | isGoal: false, |
| 45 | agent: -1, |
| 46 | color: "", |
| 47 | })) |
| 48 | ), |
| 49 | agents: [], |
| 50 | numAgents: 0, |
| 51 | addedSRow: null, |
| 52 | addedSCol: null, |
| 53 | addedGRow: null, |
| 54 | addedGCol: null, |
| 55 | snackbarOpen: false, |
| 56 | isError: false, |
| 57 | isMousePressed: false, |
| 58 | isPlanning: false, |
| 59 | isPlanned: false, |
| 60 | isAnimationFinished: false, |
| 61 | planningTime: -1, |
| 62 | planningStatus: "", |
| 63 | paths: [], |
| 64 | isInfoDialogOpen: true, |
| 65 | isDialogOpen: false, |
| 66 | isAlgDialogOpen: false, |
| 67 | |
| 68 | algorithmSummary: "", |
| 69 | |
| 70 | startToAdd: false, |
| 71 | goalToAdd: false, |
| 72 | colorToAdd: "", |
| 73 | addedSRowClick: null, |
| 74 | addedSColClick: null, |
| 75 | toDelete: false, |
| 76 | |
| 77 | usedColors: new Set(), |
| 78 | name: this.props.populate.name, |
| 79 | options: structuredClone(this.props.populate.options), |
| 80 | description: this.props.populate.description, |
| 81 | |
| 82 | speed: 0.6, |
| 83 | }; |
| 84 | } |
| 85 | |
| 86 | adjustMap(height, width, map) { |
| 87 | this.setState({ |
nothing calls this directly
no outgoing calls
no test coverage detected