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

Function getNaturalDragY

src/components/legend/draw.js:391–394  ·  view source on GitHub ↗
(scrollBoxY0, eventY0, eventY1)

Source from the content-addressed store, hash-verified

389 };
390
391 var getNaturalDragY = function(scrollBoxY0, eventY0, eventY1) {
392 var y = ((eventY0 - eventY1) / scrollRatio) + scrollBoxY0;
393 return Lib.constrain(y, 0, scrollBoxYMax);
394 };
395
396 // scroll legend by dragging scrollBAR
397 var scrollBarDrag = d3.behavior.drag()

Callers 1

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