mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Ellipse refactor
Signed-off-by: Mark Tolmacs <mark@lazycat.hu>
This commit is contained in:
parent
017047d15e
commit
3efa8735ef
10 changed files with 301 additions and 217 deletions
|
@ -73,6 +73,7 @@ import {
|
|||
pointFromPair,
|
||||
pointDistanceSq,
|
||||
clamp,
|
||||
radians,
|
||||
} from "../../math";
|
||||
import { segmentIntersectRectangleElement } from "../../utils/geometry/shape";
|
||||
|
||||
|
@ -845,7 +846,7 @@ export const avoidRectangularCorner = (
|
|||
element.x + element.width / 2,
|
||||
element.y + element.height / 2,
|
||||
);
|
||||
const nonRotatedPoint = pointRotateRads(p, center, -element.angle as Radians);
|
||||
const nonRotatedPoint = pointRotateRads(p, center, radians(-element.angle));
|
||||
|
||||
if (nonRotatedPoint[0] < element.x && nonRotatedPoint[1] < element.y) {
|
||||
// Top left
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue