Remove resized element if it is invisibly small (#405)

This commit is contained in:
Günay Mert Karadoğan 2020-01-16 22:16:11 +00:00 committed by David Luzar
parent 4234cd849c
commit 8bc049a0b9
3 changed files with 17 additions and 3 deletions

View file

@ -12,3 +12,4 @@ export { resizeTest } from "./resizeTest";
export { isTextElement } from "./typeChecks";
export { textWysiwyg } from "./textWysiwyg";
export { redrawTextBoundingBox } from "./textElement";
export { isInvisiblySmallElement } from "./sizeChecks";

View file

@ -0,0 +1,5 @@
import { ExcalidrawElement } from "./types";
export function isInvisiblySmallElement(element: ExcalidrawElement): boolean {
return element.width === 0 && element.height === 0;
}