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

Method handleAddAgent

src/MAPFVisualizer.jsx:267–280  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

265 }
266
267 handleAddAgent(e) {
268 e.preventDefault();
269 const error =
270 this.state.addedSRow >= this.state.numRow ||
271 this.state.addedSRow < 0 ||
272 this.state.addedSCol >= this.state.numCol ||
273 this.state.addedSCol < 0 ||
274 this.state.addedGRow >= this.state.numRow ||
275 this.state.addedGRow < 0 ||
276 this.state.addedGCol >= this.state.numCol ||
277 this.state.addedGCol < 0;
278 if (error) return;
279 this.addAgentToMap();
280 }
281
282 handleAddAgentByClick() {
283 const color = randomColor({ luminosity: "light", alpha: 0.5 });

Callers

nothing calls this directly

Calls 1

addAgentToMapMethod · 0.95

Tested by

no test coverage detected