mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: add support for regular polygon shape with customizable sides
This commit is contained in:
parent
2a0d15799c
commit
c8d38e87b0
24 changed files with 329 additions and 67 deletions
|
@ -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");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue