@@ -135,18 +135,8 @@ exports.plot = function(gd, data, layout, config) {
135135 gd . empty = false ;
136136 }
137137
138- if ( ! gd . layout || graphWasEmpty ) gd . layout = helpers . cleanLayout ( layout ) ;
139-
140- // if the user is trying to drag the axes, allow new data and layout
141- // to come in but don't allow a replot.
142- if ( gd . _dragging && ! gd . _transitioning ) {
143- // signal to drag handler that after everything else is done
144- // we need to replot, because something has changed
145- gd . _replotPending = true ;
146- return Promise . reject ( ) ;
147- } else {
148- // we're going ahead with a replot now
149- gd . _replotPending = false ;
138+ if ( ! gd . layout || graphWasEmpty ) {
139+ gd . layout = helpers . cleanLayout ( layout ) ;
150140 }
151141
152142 Plots . supplyDefaults ( gd ) ;
@@ -195,7 +185,7 @@ exports.plot = function(gd, data, layout, config) {
195185 if ( gd . _context . responsive ) {
196186 if ( ! gd . _responsiveChartHandler ) {
197187 // Keep a reference to the resize handler to purge it down the road
198- gd . _responsiveChartHandler = function ( ) { Plots . resize ( gd ) ; } ;
188+ gd . _responsiveChartHandler = function ( ) { Plots . resize ( gd ) ; } ;
199189
200190 // Listen to window resize
201191 window . addEventListener ( 'resize' , gd . _responsiveChartHandler ) ;
@@ -242,10 +232,10 @@ exports.plot = function(gd, data, layout, config) {
242232 return 'gl-canvas gl-canvas-' + d . key . replace ( 'Layer' , '' ) ;
243233 } )
244234 . style ( {
245- ' position' : 'absolute' ,
246- ' top' : 0 ,
247- ' left' : 0 ,
248- ' overflow' : 'visible' ,
235+ position : 'absolute' ,
236+ top : 0 ,
237+ left : 0 ,
238+ overflow : 'visible' ,
249239 'pointer-events' : 'none'
250240 } ) ;
251241 }
@@ -384,6 +374,7 @@ exports.plot = function(gd, data, layout, config) {
384374 initInteractions ,
385375 Plots . addLinks ,
386376 Plots . rehover ,
377+ Plots . redrag ,
387378 // TODO: doAutoMargin is only needed here for axis automargin, which
388379 // happens outside of marginPushers where all the other automargins are
389380 // calculated. Would be much better to separate margin calculations from
@@ -1402,7 +1393,7 @@ function restyle(gd, astr, val, _traces) {
14021393 seq . push ( emitAfterPlot ) ;
14031394 }
14041395
1405- seq . push ( Plots . rehover ) ;
1396+ seq . push ( Plots . rehover , Plots . redrag ) ;
14061397
14071398 Queue . add ( gd ,
14081399 restyle , [ gd , specs . undoit , specs . traces ] ,
@@ -1911,7 +1902,7 @@ function relayout(gd, astr, val) {
19111902 seq . push ( emitAfterPlot ) ;
19121903 }
19131904
1914- seq . push ( Plots . rehover ) ;
1905+ seq . push ( Plots . rehover , Plots . redrag ) ;
19151906
19161907 Queue . add ( gd ,
19171908 relayout , [ gd , specs . undoit ] ,
@@ -1992,13 +1983,8 @@ function addAxRangeSequence(seq, rangesAltered) {
19921983 return Axes . draw ( gd , 'redraw' ) ;
19931984 } ;
19941985
1995- var _clearSelect = function ( gd ) {
1996- var zoomlayer = gd . _fullLayout . _zoomlayer ;
1997- if ( zoomlayer ) clearSelect ( zoomlayer ) ;
1998- } ;
1999-
20001986 seq . push (
2001- _clearSelect ,
1987+ clearSelect ,
20021988 subroutines . doAutoRangeAndConstraints ,
20031989 drawAxes ,
20041990 subroutines . drawData ,
@@ -2449,7 +2435,7 @@ function update(gd, traceUpdate, layoutUpdate, _traces) {
24492435 seq . push ( emitAfterPlot ) ;
24502436 }
24512437
2452- seq . push ( Plots . rehover ) ;
2438+ seq . push ( Plots . rehover , Plots . redrag ) ;
24532439
24542440 Queue . add ( gd ,
24552441 update , [ gd , restyleSpecs . undoit , relayoutSpecs . undoit , restyleSpecs . traces ] ,
@@ -2852,7 +2838,7 @@ exports.react = function(gd, data, layout, config) {
28522838 seq . push ( emitAfterPlot ) ;
28532839 }
28542840
2855- seq . push ( Plots . rehover ) ;
2841+ seq . push ( Plots . rehover , Plots . redrag ) ;
28562842
28572843 plotDone = Lib . syncOrAsync ( seq , gd ) ;
28582844 if ( ! plotDone || ! plotDone . then ) plotDone = Promise . resolve ( gd ) ;
0 commit comments