()
| 719 | // Draw ticks and annotations (and other components) when ranges change. |
| 720 | // Also records the ranges that have changed for use by update at the end. |
| 721 | function ticksAndAnnotations() { |
| 722 | var activeAxIds = []; |
| 723 | var i; |
| 724 | |
| 725 | function pushActiveAxIds(axList) { |
| 726 | for(i = 0; i < axList.length; i++) { |
| 727 | if(!axList[i].fixedrange) activeAxIds.push(axList[i]._id); |
| 728 | } |
| 729 | } |
| 730 | |
| 731 | function pushActiveAxIdsSynced(axList, axisType) { |
| 732 | for(i = 0; i < axList.length; i++) { |
| 733 | var axListI = axList[i]; |
| 734 | var axListIType = axListI[axisType]; |
| 735 | if(!axListI.fixedrange && axListIType.tickmode === 'sync') activeAxIds.push(axListIType._id); |
| 736 | } |
| 737 | } |
| 738 | |
| 739 | if(editX) { |
| 740 | pushActiveAxIds(xaxes); |
| 741 | pushActiveAxIds(links.xaxes); |
| 742 | pushActiveAxIds(matches.xaxes); |
| 743 | pushActiveAxIdsSynced(plotinfo.overlays, 'xaxis'); |
| 744 | } |
| 745 | if(editY) { |
| 746 | pushActiveAxIds(yaxes); |
| 747 | pushActiveAxIds(links.yaxes); |
| 748 | pushActiveAxIds(matches.yaxes); |
| 749 | pushActiveAxIdsSynced(plotinfo.overlays, 'yaxis'); |
| 750 | } |
| 751 | |
| 752 | updates = {}; |
| 753 | for(i = 0; i < activeAxIds.length; i++) { |
| 754 | var axId = activeAxIds[i]; |
| 755 | var ax = getFromId(gd, axId); |
| 756 | Axes.drawOne(gd, ax, {skipTitle: true}); |
| 757 | updates[ax._name + '.range[0]'] = ax.range[0]; |
| 758 | updates[ax._name + '.range[1]'] = ax.range[1]; |
| 759 | } |
| 760 | |
| 761 | Axes.redrawComponents(gd, activeAxIds); |
| 762 | } |
| 763 | |
| 764 | function doubleClick() { |
| 765 | if(gd._transitioningWithDuration) return; |
no test coverage detected
searching dependent graphs…