@@ -1286,7 +1286,7 @@ Plotly.restyle = function restyle(gd, astr, val, _traces) {
1286
1286
1287
1287
// clear calcdata and/or axis types if required so they get regenerated
1288
1288
if ( flags . clearCalc ) gd . calcdata = undefined ;
1289
- if ( flags . clearAxisTypes ) clearAxisTypes ( gd , traces , { } ) ;
1289
+ if ( flags . clearAxisTypes ) helpers . clearAxisTypes ( gd , traces , { } ) ;
1290
1290
1291
1291
// fill in redraw sequence
1292
1292
var seq = [ ] ;
@@ -2095,7 +2095,7 @@ Plotly.update = function update(gd, traceUpdate, layoutUpdate, _traces) {
2095
2095
2096
2096
// clear calcdata and/or axis types if required
2097
2097
if ( restyleFlags . clearCalc || relayoutFlags . calc ) gd . calcdata = undefined ;
2098
- if ( restyleFlags . clearAxisTypes ) clearAxisTypes ( gd , traces , layoutUpdate ) ;
2098
+ if ( restyleFlags . clearAxisTypes ) helpers . clearAxisTypes ( gd , traces , layoutUpdate ) ;
2099
2099
2100
2100
// fill in redraw sequence
2101
2101
var seq = [ ] ;
@@ -2150,33 +2150,6 @@ Plotly.update = function update(gd, traceUpdate, layoutUpdate, _traces) {
2150
2150
} ) ;
2151
2151
} ;
2152
2152
2153
- // empty out types for all axes containing these traces
2154
- // so we auto-set them again
2155
- var axLetters = [ 'x' , 'y' , 'z' ] ;
2156
- function clearAxisTypes ( gd , traces , layoutUpdate ) {
2157
- for ( var i = 0 ; i < traces . length ; i ++ ) {
2158
- var trace = gd . _fullData [ i ] ;
2159
- for ( var j = 0 ; j < 3 ; j ++ ) {
2160
- var ax = Plotly . Axes . getFromTrace ( gd , trace , axLetters [ j ] ) ;
2161
-
2162
- // do not clear log type - that's never an auto result so must have been intentional
2163
- if ( ax && ax . type !== 'log' ) {
2164
- var axAttr = ax . _name ;
2165
- var sceneName = ax . _id . substr ( 1 ) ;
2166
- if ( sceneName . substr ( 0 , 5 ) === 'scene' ) {
2167
- if ( layoutUpdate [ sceneName ] !== undefined ) continue ;
2168
- axAttr = sceneName + '.' + axAttr ;
2169
- }
2170
- var typeAttr = axAttr + '.type' ;
2171
-
2172
- if ( layoutUpdate [ axAttr ] === undefined && layoutUpdate [ typeAttr ] === undefined ) {
2173
- Lib . nestedProperty ( gd . layout , typeAttr ) . set ( null ) ;
2174
- }
2175
- }
2176
- }
2177
- }
2178
- }
2179
-
2180
2153
/**
2181
2154
* Animate to a frame, sequence of frame, frame group, or frame definition
2182
2155
*
0 commit comments