Remove resized element if it is invisibly small (#405)
This commit is contained in:
committed by
David Luzar
parent
4234cd849c
commit
8bc049a0b9
@ -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;
|
||||
}
|
Reference in New Issue
Block a user