File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 99
1010'use strict' ;
1111
12- var Plotly = require ( '../../plotly' ) ;
1312var d3 = require ( 'd3' ) ;
1413
14+ var Plotly = require ( '../../plotly' ) ;
15+ var Lib = require ( '../../lib' ) ;
1516var Icons = require ( '../../../build/ploticon' ) ;
1617
1718
@@ -204,7 +205,11 @@ proto.updateActiveButton = function(buttonClicked) {
204205 }
205206 }
206207 else {
207- button3 . classed ( 'active' , fullLayout [ dataAttr ] === thisval ) ;
208+ var val = ( dataAttr === null ) ?
209+ dataAttr :
210+ Lib . nestedProperty ( fullLayout , dataAttr ) . get ( ) ;
211+
212+ button3 . classed ( 'active' , val === thisval ) ;
208213 }
209214
210215 } ) ;
@@ -260,7 +265,7 @@ proto.removeAllButtons = function() {
260265} ;
261266
262267proto . destroy = function ( ) {
263- Plotly . Lib . removeElement ( this . container . querySelector ( '.modebar' ) ) ;
268+ Lib . removeElement ( this . container . querySelector ( '.modebar' ) ) ;
264269} ;
265270
266271function createModeBar ( gd , buttons ) {
You can’t perform that action at this time.
0 commit comments