mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Normalize dimensions (#527)
* normalize dimensions of non-linear elements * fix element type check regression
This commit is contained in:
parent
d65e90209c
commit
afb1d6725f
6 changed files with 141 additions and 39 deletions
|
@ -86,3 +86,7 @@ export function removeSelection() {
|
|||
selection.removeAllRanges();
|
||||
}
|
||||
}
|
||||
|
||||
export function distance(x: number, y: number) {
|
||||
return Math.abs(x > y ? x - y : y - x);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue