MCPcopy Create free account
hub / github.com/StevenLyt/mapf-visualizer / startNewTask

Method startNewTask

src/LAMAPFVisualizer.jsx:576–620  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

574 }
575
576 startNewTask() {
577 this.setState(
578 {
579 numRow: DEFAULTROW,
580 numCol: DEFAULTCOL,
581 tempRow: DEFAULTROW,
582 tempCol: DEFAULTCOL,
583 map: this.createEmptyMap(DEFAULTROW, DEFAULTCOL),
584 agents: [],
585 numAgents: 0,
586 addedSRow: null,
587 addedSCol: null,
588 addedGRow: null,
589 addedGCol: null,
590 addedHeight: null,
591 addedWidth: null,
592 snackbarOpen: false,
593 isError: false,
594 isMousePressed: false,
595 isPlanning: false,
596 isPlanned: false,
597 isAnimationFinished: false,
598 planningTime: -1,
599 planningStatus: "",
600 paths: [],
601 usedColors: new Set(),
602 startToAdd: false,
603 goalToAdd: false,
604 addedHeightByClick: null,
605 addedWidthByClick: null,
606 addedSRowClick: null,
607 addedSColClick: null,
608 toDelete: false,
609 speed: 0.6,
610 },
611 () => {
612 for (let i = 0; i < DEFAULTROW; i++) {
613 for (let j = 0; j < DEFAULTCOL; j++) {
614 document.getElementById(`grid-${i}-${j}`).style.backgroundColor = "";
615 document.getElementById(`grid-${i}-${j}`).style.border = "";
616 }
617 }
618 }
619 );
620 }
621
622 checkRowOOR() {
623 return (

Callers 1

renderMethod · 0.95

Calls 1

createEmptyMapMethod · 0.95

Tested by

no test coverage detected