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

Function newPointNumTester

src/components/selections/select.js:592–609  ·  view source on GitHub ↗
(pointSelectionDef)

Source from the content-addressed store, hash-verified

590 * Constructs a new point number tester.
591 */
592function newPointNumTester(pointSelectionDef) {
593 return {
594 xmin: 0,
595 xmax: 0,
596 ymin: 0,
597 ymax: 0,
598 pts: [],
599 contains: function(pt, omitFirstEdge, pointNumber, searchInfo) {
600 var idxWantedTrace = pointSelectionDef.searchInfo.cd[0].trace.index;
601 var idxActualTrace = searchInfo.cd[0].trace.index;
602 return idxActualTrace === idxWantedTrace &&
603 pointNumber === pointSelectionDef.pointNumber;
604 },
605 isRect: false,
606 degenerate: false,
607 subtract: !!pointSelectionDef.subtract
608 };
609}
610
611/**
612 * Wraps multiple selection testers.

Callers 1

multiTesterFunction · 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…