File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 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) {
669669
670670 delete gd . _fullLayout . _activeShapeIndex ;
671671
672- Registry . call ( '_guiRelayout' , gd , {
672+ return Registry . call ( '_guiRelayout' , gd , {
673673 shapes : list
674674 } ) ;
675675 }
Original file line number Diff line number Diff line change @@ -24,6 +24,12 @@ exports.deleteFrames = main.deleteFrames;
2424exports . animate = main . animate ;
2525exports . setPlotConfig = main . setPlotConfig ;
2626
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+
2733exports . toImage = require ( './to_image' ) ;
2834exports . validate = require ( './validate' ) ;
2935exports . downloadImage = require ( '../snapshot/download' ) ;
You can’t perform that action at this time.
0 commit comments