Skip to content

Commit 8fce07c

Browse files
committed
Revert "Remove unnecessary step from shapes.drawAll()"
This reverts commit f67ff4d.
1 parent 30b9cc6 commit 8fce07c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/components/shapes/index.js

+6
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ function linearToData(ax) { return ax.type === 'category' ? ax.l2c : ax.l2d; }
9494

9595
shapes.drawAll = function(gd) {
9696
var fullLayout = gd._fullLayout;
97+
98+
// Remove previous shapes before drawing new in shapes in fullLayout.shapes
99+
fullLayout._shapeUpperLayer.selectAll('path').remove();
100+
fullLayout._shapeLowerLayer.selectAll('path').remove();
101+
fullLayout._subplotShapeLayer.selectAll('path').remove();
102+
97103
for(var i = 0; i < fullLayout.shapes.length; i++) {
98104
shapes.draw(gd, i);
99105
}

0 commit comments

Comments
 (0)