@@ -1408,16 +1408,6 @@ function _restyle(gd, aobj, traces) {
14081408 return 'LAYOUT' + axName + '.range' ;
14091409 }
14101410
1411- function getFullTrace ( traceIndex ) {
1412- // usually fullData maps 1:1 onto data, but with groupby transforms
1413- // the fullData index can be greater. Take the *first* matching trace.
1414- for ( var j = traceIndex ; j < fullData . length ; j ++ ) {
1415- if ( fullData [ j ] . _input === data [ traceIndex ] ) return fullData [ j ] ;
1416- }
1417- // should never get here - and if we *do* it should cause an error
1418- // later on undefined fullTrace is passed to nestedProperty.
1419- }
1420-
14211411 // for attrs that interact (like scales & autoscales), save the
14221412 // old vals before making the change
14231413 // val=undefined will not set a value, just record what the value was.
@@ -1438,7 +1428,7 @@ function _restyle(gd, aobj, traces) {
14381428 extraparam = layoutNP ( gd . layout , attr . replace ( 'LAYOUT' , '' ) ) ;
14391429 } else {
14401430 var tracei = traces [ i ] ;
1441- var preGUI = fullLayout . _tracePreGUI [ getFullTrace ( tracei ) . uid ] ;
1431+ var preGUI = fullLayout . _tracePreGUI [ fullData [ tracei ] . uid ] ;
14421432 extraparam = makeNP ( preGUI , guiEditFlag ) ( data [ tracei ] , attr ) ;
14431433 }
14441434
@@ -1509,7 +1499,7 @@ function _restyle(gd, aobj, traces) {
15091499 undoit [ ai ] = a0 ( ) ;
15101500 for ( i = 0 ; i < traces . length ; i ++ ) {
15111501 cont = data [ traces [ i ] ] ;
1512- contFull = getFullTrace ( traces [ i ] ) ;
1502+ contFull = fullData [ traces [ i ] ] ;
15131503 var preGUI = fullLayout . _tracePreGUI [ contFull . uid ] ;
15141504 param = makeNP ( preGUI , guiEditFlag ) ( cont , ai ) ;
15151505 oldVal = param . get ( ) ;
@@ -2343,8 +2333,7 @@ var layoutUIControlPatterns = [
23432333// or with no `attr` we use `trace.uirevision`
23442334var traceUIControlPatterns = [
23452335 { pattern : / ^ s e l e c t e d p o i n t s $ / , attr : 'selectionrevision' } ,
2346- // "visible" includes trace.transforms[i].styles[j].value.visible
2347- { pattern : / ( ^ | v a l u e \. ) v i s i b l e $ / , attr : 'legend.uirevision' } ,
2336+ { pattern : / ^ v i s i b l e $ / , attr : 'legend.uirevision' } ,
23482337 { pattern : / ^ d i m e n s i o n s \[ \d + \] \. c o n s t r a i n t r a n g e / } ,
23492338 { pattern : / ^ n o d e \. ( x | y | g r o u p s ) / } , // for Sankey nodes
23502339 { pattern : / ^ l e v e l $ / } , // for Sunburst, Treemap and Icicle traces
@@ -2354,8 +2343,7 @@ var traceUIControlPatterns = [
23542343 // reasonable or should these be `editrevision`?
23552344 // Also applies to axis titles up in the layout section
23562345
2357- // "name" also includes transform.styles
2358- { pattern : / ( ^ | v a l u e \. ) n a m e $ / } ,
2346+ { pattern : / ^ n a m e $ / } ,
23592347 // including nested colorbar attributes (ie marker.colorbar)
23602348 { pattern : / c o l o r b a r \. t i t l e \. t e x t $ / } ,
23612349 { pattern : / c o l o r b a r \. ( x | y ) $ / , attr : 'editrevision' }
0 commit comments