mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Remove resized element if it is invisibly small (#405)
This commit is contained in:
parent
4234cd849c
commit
8bc049a0b9
3 changed files with 17 additions and 3 deletions
|
@ -12,3 +12,4 @@ export { resizeTest } from "./resizeTest";
|
|||
export { isTextElement } from "./typeChecks";
|
||||
export { textWysiwyg } from "./textWysiwyg";
|
||||
export { redrawTextBoundingBox } from "./textElement";
|
||||
export { isInvisiblySmallElement } from "./sizeChecks";
|
||||
|
|
5
src/element/sizeChecks.ts
Normal file
5
src/element/sizeChecks.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
import { ExcalidrawElement } from "./types";
|
||||
|
||||
export function isInvisiblySmallElement(element: ExcalidrawElement): boolean {
|
||||
return element.width === 0 && element.height === 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue