Skip to content

Commit acc317f

Browse files
committed
function wrap, rename and return
1 parent 389b211 commit acc317f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/components/shapes/draw.js

+1-1
Original file line numberDiff line numberDiff 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
}

src/plot_api/index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ exports.deleteFrames = main.deleteFrames;
2424
exports.animate = main.animate;
2525
exports.setPlotConfig = main.setPlotConfig;
2626

27-
exports.eraseActiveShape = require('../components/shapes/draw').eraseActiveShape;
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+
};
2832

2933
exports.toImage = require('./to_image');
3034
exports.validate = require('./validate');

0 commit comments

Comments
 (0)