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

Function getLinkedScaleFactor

src/plots/cartesian/dragbox.js:1013–1023  ·  view source on GitHub ↗
(ax, xScaleFactor, yScaleFactor)

Source from the content-addressed store, hash-verified

1011 // dragged axes by constraints. 0 is special, it means this axis shouldn't
1012 // ever be scaled (will be converted to 1 if the other axis is scaled)
1013 function getLinkedScaleFactor(ax, xScaleFactor, yScaleFactor) {
1014 if(ax.fixedrange) return 0;
1015
1016 if(editX && links.xaHash[ax._id]) {
1017 return xScaleFactor;
1018 }
1019 if(editY && (links.isSubplotConstrained ? links.xaHash : links.yaHash)[ax._id]) {
1020 return yScaleFactor;
1021 }
1022 return 0;
1023 }
1024
1025 function scaleAndGetShift(ax, scaleFactor) {
1026 if(scaleFactor) {

Callers 1

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