| 600 | // TODO: this makes (generally non-fatal) errors when you get |
| 601 | // near floating point limits |
| 602 | function dz(axArray, end, d) { |
| 603 | var otherEnd = 1 - end; |
| 604 | var movedAx; |
| 605 | var newLinearizedEnd; |
| 606 | for(var i = 0; i < axArray.length; i++) { |
| 607 | var axi = axArray[i]; |
| 608 | if(axi.fixedrange) continue; |
| 609 | movedAx = axi; |
| 610 | newLinearizedEnd = axi._rl[otherEnd] + |
| 611 | (axi._rl[end] - axi._rl[otherEnd]) / dZoom(d / axi._length); |
| 612 | var newEnd = axi.l2r(newLinearizedEnd); |
| 613 | |
| 614 | // if l2r comes back false or undefined, it means we've dragged off |
| 615 | // the end of valid ranges - so stop. |
| 616 | if(newEnd !== false && newEnd !== undefined) axi.range[end] = newEnd; |
| 617 | } |
| 618 | return movedAx._length * (movedAx._rl[end] - newLinearizedEnd) / |
| 619 | (movedAx._rl[end] - movedAx._rl[otherEnd]); |
| 620 | } |
| 621 | |
| 622 | var dxySign = ((xActive === 'w') === (yActive === 'n')) ? 1 : -1; |
| 623 | if(xActive && yActive && (links.isSubplotConstrained || matches.isSubplotConstrained)) { |