MCPcopy Create free account
hub / github.com/plotly/plotly.js / onlyConstrainedPoint

Function onlyConstrainedPoint

src/traces/scatter/line_points.js:178–182  ·  view source on GitHub ↗
(pt)

Source from the content-addressed store, hash-verified

176 }
177
178 function onlyConstrainedPoint(pt) {
179 if(pt[0] < xEdge0 || pt[0] > xEdge1 || pt[1] < yEdge0 || pt[1] > yEdge1) {
180 return [constrain(pt[0], xEdge0, xEdge1), constrain(pt[1], yEdge0, yEdge1)];
181 }
182 }
183
184 function sameEdge(pt1, pt2) {
185 if(pt1[0] === pt2[0] && (pt1[0] === xEdge0 || pt1[0] === xEdge1)) return true;

Callers 2

getHVEdgeIntersectionsFunction · 0.85
getABAEdgeIntersectionsFunction · 0.85

Calls 1

constrainFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…