| 1769 | // Optimization mostly for large splom traces where |
| 1770 | // Plots.supplyDefaults can take > 100ms |
| 1771 | function axRangeSupplyDefaultsByPass(gd, flags, specs) { |
| 1772 | var fullLayout = gd._fullLayout; |
| 1773 | |
| 1774 | if (!flags.axrange) return false; |
| 1775 | |
| 1776 | for (var k in flags) { |
| 1777 | if (k !== 'axrange' && flags[k]) return false; |
| 1778 | } |
| 1779 | |
| 1780 | var axIn, axOut; |
| 1781 | var coerce = function (attr, dflt) { |
| 1782 | return Lib.coerce(axIn, axOut, cartesianLayoutAttributes, attr, dflt); |
| 1783 | }; |
| 1784 | |
| 1785 | var options = {}; // passing empty options for now! |
| 1786 | |
| 1787 | for (var axId in specs.rangesAltered) { |
| 1788 | var axName = Axes.id2name(axId); |
| 1789 | axIn = gd.layout[axName]; |
| 1790 | axOut = fullLayout[axName]; |
| 1791 | |
| 1792 | handleRangeDefaults(axIn, axOut, coerce, options); |
| 1793 | |
| 1794 | if (axOut._matchGroup) { |
| 1795 | for (var axId2 in axOut._matchGroup) { |
| 1796 | if (axId2 !== axId) { |
| 1797 | var ax2 = fullLayout[Axes.id2name(axId2)]; |
| 1798 | ax2.autorange = axOut.autorange; |
| 1799 | ax2.range = axOut.range.slice(); |
| 1800 | ax2._input.range = axOut.range.slice(); |
| 1801 | } |
| 1802 | } |
| 1803 | } |
| 1804 | } |
| 1805 | |
| 1806 | return true; |
| 1807 | } |
| 1808 | |
| 1809 | function addAxRangeSequence(seq, rangesAltered) { |
| 1810 | // N.B. leave as sequence of subroutines (for now) instead of |