File tree 1 file changed +8
-3
lines changed
1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 9
9
10
10
'use strict' ;
11
11
12
- var Plotly = require ( '../../plotly' ) ;
13
12
var d3 = require ( 'd3' ) ;
14
13
14
+ var Plotly = require ( '../../plotly' ) ;
15
+ var Lib = require ( '../../lib' ) ;
15
16
var Icons = require ( '../../../build/ploticon' ) ;
16
17
17
18
@@ -204,7 +205,11 @@ proto.updateActiveButton = function(buttonClicked) {
204
205
}
205
206
}
206
207
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 ) ;
208
213
}
209
214
210
215
} ) ;
@@ -260,7 +265,7 @@ proto.removeAllButtons = function() {
260
265
} ;
261
266
262
267
proto . destroy = function ( ) {
263
- Plotly . Lib . removeElement ( this . container . querySelector ( '.modebar' ) ) ;
268
+ Lib . removeElement ( this . container . querySelector ( '.modebar' ) ) ;
264
269
} ;
265
270
266
271
function createModeBar ( gd , buttons ) {
You can’t perform that action at this time.
0 commit comments