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

Function getNextPoint

src/components/shapes/display_outlines.js:359–376  ·  view source on GitHub ↗
(cell, j)

Source from the content-addressed store, hash-verified

357}
358
359function getNextPoint(cell, j) {
360 var x = cell[j][1];
361 var y = cell[j][2];
362 var len = cell.length;
363 var nextJ, nextX, nextY;
364 nextJ = (j + 1) % len;
365 nextX = cell[nextJ][1];
366 nextY = cell[nextJ][2];
367
368 // avoid potential double points (closing points)
369 if(nextX === x && nextY === y) {
370 nextJ = (j + 2) % len;
371 nextX = cell[nextJ][1];
372 nextY = cell[nextJ][2];
373 }
374
375 return [nextJ, nextX, nextY];
376}
377
378function eraseActiveSelection(gd) {
379 // Do not allow removal of selections on other dragmodes.

Callers 2

moveVertexControllerFunction · 0.85
addVertexControllersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…