feat: add flipping multiple elements with a command

This commit is contained in:
Alex Kim 2022-12-19 19:50:23 +03:00
parent b9a185d098
commit c7667cc7d7
No known key found for this signature in database
GPG key ID: CEE74CFA44D238D7
2 changed files with 20 additions and 165 deletions

View file

@ -587,7 +587,7 @@ export const resizeSingleElement = (
}
};
const resizeMultipleElements = (
export const resizeMultipleElements = (
pointerDownState: PointerDownState,
selectedElements: readonly NonDeletedExcalidrawElement[],
transformHandleType: "nw" | "ne" | "sw" | "se",
@ -684,6 +684,7 @@ const resizeMultipleElements = (
const x = anchorX + flipFactorX * (offsetX * scale + flipAdjustX);
const y = anchorY + flipFactorY * (offsetY * scale + flipAdjustY);
// TODO curved lines adjustment
// readjust points for linear & free draw elements
const rescaledPoints = rescalePointsInElement(
element.orig,