File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -364,7 +364,7 @@ modeBarButtons.hoverClosest3d = {
364364
365365function handleHover3d ( gd , ev ) {
366366 var button = ev . currentTarget ,
367- val = JSON . parse ( button . getAttribute ( 'data-val' ) ) || false ,
367+ val = button . _previousVal || false ,
368368 layout = gd . layout ,
369369 fullLayout = gd . _fullLayout ,
370370 sceneIds = Plotly . Plots . getSubplotIds ( fullLayout , 'gl3d' ) ;
@@ -379,7 +379,7 @@ function handleHover3d(gd, ev) {
379379
380380 if ( val ) {
381381 layoutUpdate = Lib . extendDeep ( layout , val ) ;
382- button . setAttribute ( 'data-val' , JSON . stringify ( null ) ) ;
382+ button . _previousVal = null ;
383383 }
384384 else {
385385 layoutUpdate = {
@@ -406,7 +406,7 @@ function handleHover3d(gd, ev) {
406406 }
407407 }
408408
409- button . setAttribute ( 'data-val' , JSON . stringify ( currentSpikes ) ) ;
409+ button . _previousVal = Lib . extendDeep ( { } , currentSpikes ) ;
410410 }
411411
412412 Plotly . relayout ( gd , layoutUpdate ) ;
You can’t perform that action at this time.
0 commit comments