File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -364,7 +364,7 @@ modeBarButtons.hoverClosest3d = {
364
364
365
365
function handleHover3d ( gd , ev ) {
366
366
var button = ev . currentTarget ,
367
- val = JSON . parse ( button . getAttribute ( 'data-val' ) ) || false ,
367
+ val = button . _previousVal || false ,
368
368
layout = gd . layout ,
369
369
fullLayout = gd . _fullLayout ,
370
370
sceneIds = Plotly . Plots . getSubplotIds ( fullLayout , 'gl3d' ) ;
@@ -379,7 +379,7 @@ function handleHover3d(gd, ev) {
379
379
380
380
if ( val ) {
381
381
layoutUpdate = Lib . extendDeep ( layout , val ) ;
382
- button . setAttribute ( 'data-val' , JSON . stringify ( null ) ) ;
382
+ button . _previousVal = null ;
383
383
}
384
384
else {
385
385
layoutUpdate = {
@@ -406,7 +406,7 @@ function handleHover3d(gd, ev) {
406
406
}
407
407
}
408
408
409
- button . setAttribute ( 'data-val' , JSON . stringify ( currentSpikes ) ) ;
409
+ button . _previousVal = Lib . extendDeep ( { } , currentSpikes ) ;
410
410
}
411
411
412
412
Plotly . relayout ( gd , layoutUpdate ) ;
You can’t perform that action at this time.
0 commit comments