Skip to content

Commit 076094b

Browse files
committed
feat: no longer able to add vertices when shape is not a polygon
1 parent 76c86c9 commit 076094b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

components/core/CreateShape.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ const CreateShape = (props) => {
138138
"formula": newFormula,
139139
});
140140

141-
} else if (name === "click" && event.target.id === "shapeShadow") { // If background of preview is clicked, add a verticeCoordinate value at its location and adjust formula
141+
} else if (name === "click" && event.target.id === "shapeShadow" && shapeInformation.clipPathType === "polygon") { // If background of preview is clicked, add a verticeCoordinate value at its location and adjust formula
142142

143143
const newVerticeCoordinates = addNewVerticeCoordinates(event.nativeEvent.offsetX, event.nativeEvent.offsetY, shapeInformation.verticeCoordinates.length);
144144
const newFormula = generateNewFormula(newVerticeCoordinates);

0 commit comments

Comments
 (0)