mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: Add option to flip single element on the context menu (#2520)
Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
parent
458e6d6c24
commit
b0d7ff290f
12 changed files with 872 additions and 4 deletions
|
@ -31,7 +31,7 @@ import {
|
|||
import { PointerDownState } from "../components/App";
|
||||
import { Point } from "../types";
|
||||
|
||||
const normalizeAngle = (angle: number): number => {
|
||||
export const normalizeAngle = (angle: number): number => {
|
||||
if (angle >= 2 * Math.PI) {
|
||||
return angle - 2 * Math.PI;
|
||||
}
|
||||
|
@ -181,7 +181,7 @@ const getPerfectElementSizeWithRotation = (
|
|||
return rotate(size.width, size.height, 0, 0, -angle);
|
||||
};
|
||||
|
||||
const reshapeSingleTwoPointElement = (
|
||||
export const reshapeSingleTwoPointElement = (
|
||||
element: NonDeleted<ExcalidrawLinearElement>,
|
||||
resizeArrowDirection: "origin" | "end",
|
||||
isRotateWithDiscreteAngle: boolean,
|
||||
|
@ -378,7 +378,7 @@ const resizeSingleTextElement = (
|
|||
}
|
||||
};
|
||||
|
||||
const resizeSingleElement = (
|
||||
export const resizeSingleElement = (
|
||||
stateAtResizeStart: NonDeletedExcalidrawElement,
|
||||
shouldKeepSidesRatio: boolean,
|
||||
element: NonDeletedExcalidrawElement,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue