@@ -19,7 +19,7 @@ var Lib = require('../lib');
19
19
var Color = require ( '../components/color' ) ;
20
20
var BADNUM = require ( '../constants/numerical' ) . BADNUM ;
21
21
22
- var axisIDs = require ( '../plots /cartesian/axis_ids' ) ;
22
+ var axisIDs = require ( './cartesian/axis_ids' ) ;
23
23
24
24
var animationAttrs = require ( './animation_attributes' ) ;
25
25
var frameAttrs = require ( './frame_attributes' ) ;
@@ -476,6 +476,15 @@ plots.supplyDefaults = function(gd, opts) {
476
476
// clean subplots and other artifacts from previous plot calls
477
477
plots . cleanPlot ( newFullData , newFullLayout , oldFullData , oldFullLayout ) ;
478
478
479
+ // clear selection outline until we implement persistent selection,
480
+ // don't clear them though when drag handlers (e.g. listening to
481
+ // `plotly_selecting`) update the graph.
482
+ // we should try to come up with a better solution when implementing
483
+ // https://github.com/plotly/plotly.js/issues/1851
484
+ if ( oldFullLayout . _zoomlayer && ! gd . _dragging ) {
485
+ oldFullLayout . _zoomlayer . selectAll ( '.select-outline' ) . remove ( ) ;
486
+ }
487
+
479
488
// relink functions and _ attributes to promote consistency between plots
480
489
relinkPrivateKeys ( newFullLayout , oldFullLayout ) ;
481
490
@@ -779,10 +788,6 @@ plots.cleanPlot = function(newFullData, newFullLayout, oldFullData, oldFullLayou
779
788
oldFullLayout . _infolayer . select ( '.cb' + oldUid ) . remove ( ) ;
780
789
}
781
790
}
782
-
783
- if ( oldFullLayout . _zoomlayer ) {
784
- oldFullLayout . _zoomlayer . selectAll ( '.select-outline' ) . remove ( ) ;
785
- }
786
791
} ;
787
792
788
793
plots . linkSubplots = function ( newFullData , newFullLayout , oldFullData , oldFullLayout ) {
0 commit comments