@@ -1721,6 +1721,10 @@ exports.relayout = function relayout(gd, astr, val) {
1721
1721
} ) ;
1722
1722
} ;
1723
1723
1724
+ var AX_RANGE_RE = / ^ [ x y z ] a x i s [ 0 - 9 ] * \. r a n g e ( \[ [ 0 | 1 ] \] ) ? $ / ;
1725
+ var AX_AUTORANGE_RE = / ^ [ x y z ] a x i s [ 0 - 9 ] * \. a u t o r a n g e $ / ;
1726
+ var AX_DOMAIN_RE = / ^ [ x y z ] a x i s [ 0 - 9 ] * \. d o m a i n ( \[ [ 0 | 1 ] \] ) ? $ / ;
1727
+
1724
1728
function _relayout ( gd , aobj ) {
1725
1729
var layout = gd . layout ,
1726
1730
fullLayout = gd . _fullLayout ,
@@ -1834,11 +1838,11 @@ function _relayout(gd, aobj) {
1834
1838
fullLayout [ ai ] = gd . _initialAutoSize [ ai ] ;
1835
1839
}
1836
1840
// check autorange vs range
1837
- else if ( pleafPlus . match ( / ^ [ x y z ] a x i s [ 0 - 9 ] * \. r a n g e ( \[ [ 0 | 1 ] \] ) ? $ / ) ) {
1841
+ else if ( pleafPlus . match ( AX_RANGE_RE ) ) {
1838
1842
recordAlteredAxis ( pleafPlus ) ;
1839
1843
Lib . nestedProperty ( fullLayout , ptrunk + '._inputRange' ) . set ( null ) ;
1840
1844
}
1841
- else if ( pleafPlus . match ( / ^ [ x y z ] a x i s [ 0 - 9 ] * \. a u t o r a n g e $ / ) ) {
1845
+ else if ( pleafPlus . match ( AX_AUTORANGE_RE ) ) {
1842
1846
recordAlteredAxis ( pleafPlus ) ;
1843
1847
Lib . nestedProperty ( fullLayout , ptrunk + '._inputRange' ) . set ( null ) ;
1844
1848
var axFull = Lib . nestedProperty ( fullLayout , ptrunk ) . get ( ) ;
@@ -1848,7 +1852,7 @@ function _relayout(gd, aobj) {
1848
1852
axFull . _input . domain = axFull . _inputDomain . slice ( ) ;
1849
1853
}
1850
1854
}
1851
- else if ( pleafPlus . match ( / ^ [ x y z ] a x i s [ 0 - 9 ] * \. d o m a i n ( \[ [ 0 | 1 ] \] ) ? $ / ) ) {
1855
+ else if ( pleafPlus . match ( AX_DOMAIN_RE ) ) {
1852
1856
Lib . nestedProperty ( fullLayout , ptrunk + '._inputDomain' ) . set ( null ) ;
1853
1857
}
1854
1858
0 commit comments