Skip to content

Commit 00b6ae2

Browse files
committed
no need to display vertex controllers while dragging
1 parent 9cd1ba1 commit 00b6ae2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/components/shapes/draw_newshape/display_outlines.js

+3-5
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@ module.exports = function displayOutlines(polygons, outlines, dragOptions, nCall
5656
}
5757

5858

59-
// remove previous controllers - only if there is an active shape
60-
if(gd._fullLayout._activeShapeIndex >= 0) clearOutlineControllers(gd);
61-
6259
var isActiveShape = dragOptions.isActiveShape;
6360
var fullLayout = gd._fullLayout;
6461
var zoomLayer = fullLayout._zoomlayer;
@@ -67,6 +64,7 @@ module.exports = function displayOutlines(polygons, outlines, dragOptions, nCall
6764
var isDrawMode = drawMode(dragmode);
6865

6966
if(isDrawMode) gd._fullLayout._drawing = true;
67+
else if(gd._fullLayout._activeShapeIndex >= 0) clearOutlineControllers(gd);
7068

7169
// make outline
7270
outlines.attr('d', writePaths(polygons));
@@ -79,8 +77,8 @@ module.exports = function displayOutlines(polygons, outlines, dragOptions, nCall
7977
var indexJ; // vertex or cell-controller index
8078
var copyPolygons;
8179

82-
if(isActiveShape) {
83-
if(!nCalls) copyPolygons = recordPositions([], polygons);
80+
if(isActiveShape && !nCalls) {
81+
copyPolygons = recordPositions([], polygons);
8482

8583
var g = zoomLayer.append('g').attr('class', 'outline-controllers');
8684
addVertexControllers(g);

0 commit comments

Comments
 (0)