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

Function getRegion

src/traces/parcoords/axisbrush.js:105–111  ·  view source on GitHub ↗
(fPix, y)

Source from the content-addressed store, hash-verified

103// is the cursor over the north, middle, or south of a bar?
104// the end handles extend over the last 10% of the bar
105function getRegion(fPix, y) {
106 var pad = c.bar.handleHeight;
107 if(y > fPix[1] + pad || y < fPix[0] - pad) return;
108 if(y >= 0.9 * fPix[1] + 0.1 * fPix[0]) return 'n';
109 if(y <= 0.9 * fPix[0] + 0.1 * fPix[1]) return 's';
110 return 'ns';
111}
112
113function clearCursor() {
114 d3.select(document.body)

Callers 1

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