MCPcopy Index your code
hub / github.com/plotly/plotly.js / eraseActiveShape

Function eraseActiveShape

src/components/shapes/draw.js:756–777  ·  view source on GitHub ↗
(gd)

Source from the content-addressed store, hash-verified

754}
755
756function eraseActiveShape(gd) {
757 if (!couldHaveActiveShape(gd)) return;
758
759 clearOutlineControllers(gd);
760
761 var id = gd._fullLayout._activeShapeIndex;
762 var shapes = (gd.layout || {}).shapes || [];
763 if (id < shapes.length) {
764 var list = [];
765 for (var q = 0; q < shapes.length; q++) {
766 if (q !== id) {
767 list.push(shapes[q]);
768 }
769 }
770
771 delete gd._fullLayout._activeShapeIndex;
772
773 return Registry.call('_guiRelayout', gd, {
774 shapes: list
775 });
776 }
777}

Callers 1

index.jsFile · 0.85

Calls 2

couldHaveActiveShapeFunction · 0.85
clearOutlineControllersFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…