feat: add support for regular polygon shape with customizable sides

This commit is contained in:
Ayesha Imran 2025-04-28 12:45:54 +05:00
parent 2a0d15799c
commit c8d38e87b0
24 changed files with 329 additions and 67 deletions

View file

@ -394,6 +394,7 @@ const drawElementOnCanvas = (
appState: StaticCanvasAppState,
) => {
switch (element.type) {
case "regularPolygon":
case "rectangle":
case "iframe":
case "embeddable":
@ -806,6 +807,7 @@ export const renderElement = (
break;
}
case "regularPolygon":
case "rectangle":
case "diamond":
case "ellipse":
@ -1077,4 +1079,4 @@ function getSvgPathFromStroke(points: number[][]): string {
)
.join(" ")
.replace(TO_FIXED_PRECISION, "$1");
}
}