File tree 3 files changed +8
-1
lines changed
3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change
1
+ - add Plotly.deleteActiveShape command [[ #6679 ] ( https://github.com/plotly/plotly.js/pull/6679 )]
Original file line number Diff line number Diff line change @@ -669,7 +669,7 @@ function eraseActiveShape(gd) {
669
669
670
670
delete gd . _fullLayout . _activeShapeIndex ;
671
671
672
- Registry . call ( '_guiRelayout' , gd , {
672
+ return Registry . call ( '_guiRelayout' , gd , {
673
673
shapes : list
674
674
} ) ;
675
675
}
Original file line number Diff line number Diff line change @@ -24,6 +24,12 @@ exports.deleteFrames = main.deleteFrames;
24
24
exports . animate = main . animate ;
25
25
exports . setPlotConfig = main . setPlotConfig ;
26
26
27
+ var getGraphDiv = require ( '../lib/dom' ) . getGraphDiv ;
28
+ var eraseActiveShape = require ( '../components/shapes/draw' ) . eraseActiveShape ;
29
+ exports . deleteActiveShape = function ( gd ) {
30
+ return eraseActiveShape ( getGraphDiv ( gd ) ) ;
31
+ } ;
32
+
27
33
exports . toImage = require ( './to_image' ) ;
28
34
exports . validate = require ( './validate' ) ;
29
35
exports . downloadImage = require ( '../snapshot/download' ) ;
You can’t perform that action at this time.
0 commit comments