diff --git a/packages/excalidraw/shapes.tsx b/packages/excalidraw/shapes.tsx index 601d6f59c..ef7aeb6cf 100644 --- a/packages/excalidraw/shapes.tsx +++ b/packages/excalidraw/shapes.tsx @@ -181,6 +181,12 @@ export const getElementShapes = ( // otherwise return the curve shape (and also the shape of its arrowheads) const arrowheadShapes: GeometricShape[] = []; + const transform = (p: Point): Point => + pointRotateRads( + pointFrom(p[0] + startingPoint[0], p[1] + startingPoint[1]), + center, + element.angle, + ); for (const arrowhead of arrowheads) { if (arrowhead.shape === "polygon") { @@ -191,9 +197,8 @@ export const getElementShapes = ( type: "polygon", data: polygonFromPoints( otherPoints.map((otherPoint) => - pointAdd( + transform( pointFrom(otherPoint.data[0], otherPoint.data[1]), - pointFrom(element.x, element.y), ), ), ),