Skip to content

Commit 4491c94

Browse files
committed
feat: fixed issue with clip-path type not switching
1 parent bb648f7 commit 4491c94

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

components/core/CreateShape.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const CreateShape = (props) => {
9090

9191
} else if (name === "clipPathType") { // If Clip-Path Type is changed, change the value of the clipPathType
9292

93-
if (clipPathType === "polygon") {
93+
if (value === "polygon") {
9494
setShapeInformation({
9595
...shapeInformation,
9696
"name": "Tilted Square",
@@ -99,7 +99,7 @@ const CreateShape = (props) => {
9999
});
100100
}
101101

102-
if (clipPathType === "circle") {
102+
if (value === "circle") {
103103
setShapeInformation({
104104
...shapeInformation,
105105
"name": "Circle",
@@ -108,7 +108,7 @@ const CreateShape = (props) => {
108108
});
109109
}
110110

111-
if (clipPathType === "ellipse") {
111+
if (value === "ellipse") {
112112
setShapeInformation({
113113
...shapeInformation,
114114
"name": "Ellipse",
@@ -120,9 +120,9 @@ const CreateShape = (props) => {
120120
setShapeInformation(prevState => {
121121
return {
122122
...prevState,
123-
"clipPathType": clipPathType,
124-
"edges": clipPathType === "polygon" ? 4 : 0,
125-
"vertices": clipPathType === "polygon" ? 4 : 0,
123+
"clipPathType": value,
124+
"edges": value === "polygon" ? 4 : 0,
125+
"vertices": value === "polygon" ? 4 : 0,
126126
"notes": "",
127127
}
128128
})

0 commit comments

Comments
 (0)