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

Function scrollHandler

src/components/legend/draw.js:440–452  ·  view source on GitHub ↗
(scrollBoxY, scrollBarHeight, scrollRatio)

Source from the content-addressed store, hash-verified

438 }
439
440 function scrollHandler(scrollBoxY, scrollBarHeight, scrollRatio) {
441 legendObj._scrollY = gd._fullLayout[legendId]._scrollY = scrollBoxY;
442 Drawing.setTranslate(scrollBox, 0, -scrollBoxY);
443
444 Drawing.setRect(
445 scrollBar,
446 legendObj._width,
447 constants.scrollBarMargin + scrollBoxY * scrollRatio,
448 constants.scrollBarWidth,
449 scrollBarHeight
450 );
451 clipPath.select('rect').attr('y', bw + scrollBoxY);
452 }
453
454 if(gd._context.edits.legendPosition) {
455 var xf, yf, x0, y0;

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…