File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ const CreateShape = (props) => {
5959 const name = event . target . name || event . type ;
6060 const value = event . target . type === "checkbox" ? event . target . checked : event . target . value ;
6161
62- // console.log(event, data);
62+ console . log ( event , data ) ;
6363
6464 // If Clip-Path formula value is changed, it makes sure that the parentheses stay there and also alters the verticeCoordinates value
6565 if ( name === "name" ) {
@@ -142,8 +142,8 @@ const CreateShape = (props) => {
142142 return ;
143143 }
144144
145- // If background of preview is clicked and the clipPathType is a polygon, add a verticeCoordinate value at its location and adjust formula
146- if ( name === "click" && event . target . id === "shapeShadow " && shapeInformation . clipPathType === "polygon" ) {
145+ // If preview is clicked and the clipPathType is a polygon, add a verticeCoordinate value at its location and adjust formula
146+ if ( ( event . target . id === "shapeShadow" || event . target . id === "clippedShape" ) && name === "click " && shapeInformation . clipPathType === "polygon" ) {
147147
148148 const newVerticeCoordinates = addNewVerticeCoordinates ( event . nativeEvent . offsetX , event . nativeEvent . offsetY , shapeInformation . verticeCoordinates . length ) ;
149149 const newFormula = generateNewFormula ( newVerticeCoordinates ) ;
You can’t perform that action at this time.
0 commit comments