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

Function scaleAndGetShift

src/plots/cartesian/dragbox.js:1025–1032  ·  view source on GitHub ↗
(ax, scaleFactor)

Source from the content-addressed store, hash-verified

1023 }
1024
1025 function scaleAndGetShift(ax, scaleFactor) {
1026 if(scaleFactor) {
1027 ax.range = ax._r.slice();
1028 scaleZoom(ax, scaleFactor);
1029 return getShift(ax, scaleFactor);
1030 }
1031 return 0;
1032 }
1033
1034 function getShift(ax, scaleFactor, from) {
1035 return ax._length * (1 - scaleFactor) * FROM_TL[from || ax.constraintoward || 'middle'];

Callers 1

updateSubplotsFunction · 0.85

Calls 1

getShiftFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…