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

Function zoomWheelOneAxis

src/plots/cartesian/dragbox.js:496–503  ·  view source on GitHub ↗
(ax, centerFraction, zoom)

Source from the content-addressed store, hash-verified

494 var i;
495
496 function zoomWheelOneAxis(ax, centerFraction, zoom) {
497 if(ax.fixedrange) return;
498
499 var axRange = Lib.simpleMap(ax.range, ax.r2l);
500 var v0 = axRange[0] + (axRange[1] - axRange[0]) * centerFraction;
501 function doZoom(v) { return ax.l2r(v0 + (v - v0) * zoom); }
502 ax.range = axRange.map(doZoom);
503 }
504
505 if(editX) {
506 // if we're only zooming this axis because of constraints,

Callers 1

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