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

Method handleAddAgentByClick

src/LAMAPFVisualizer.jsx:374–381  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

372 }
373
374 handleAddAgentByClick() {
375 var color = randomColor({ luminosity: "light" });
376 while (this.state.usedColors.has(color)) {
377 color = randomColor({ luminosity: "light" });
378 }
379 this.setState({ usedColors: this.state.usedColors.add(color) });
380 this.setState({ startToAdd: true, colorToAdd: color, toDelete: false });
381 }
382
383 emptyForm() {
384 this.setState({

Callers 1

renderMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected