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

Function activateSelection

src/components/selections/draw.js:155–171  ·  view source on GitHub ↗
(gd, path)

Source from the content-addressed store, hash-verified

153
154
155function activateSelection(gd, path) {
156 if(!couldHaveActiveSelection(gd)) return;
157
158 var element = path.node();
159 var id = +element.getAttribute('data-index');
160 if(id >= 0) {
161 // deactivate if already active
162 if(id === gd._fullLayout._activeSelectionIndex) {
163 deactivateSelection(gd);
164 return;
165 }
166
167 gd._fullLayout._activeSelectionIndex = id;
168 gd._fullLayout._deactivateSelection = deactivateSelection;
169 draw(gd);
170 }
171}
172
173function activateLastSelection(gd) {
174 if(!couldHaveActiveSelection(gd)) return;

Callers 1

drawSelectionFunction · 0.85

Calls 3

couldHaveActiveSelectionFunction · 0.85
deactivateSelectionFunction · 0.85
drawFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…