1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2024-11-02 03:25:53 +01:00

fix visibility check on rotated elements (#1799)

This commit is contained in:
Daishi Kato 2020-06-22 17:00:09 +09:00 committed by GitHub
parent a357d00bbe
commit 482fa2d90f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -15,6 +15,7 @@ import {
OMIT_SIDES_FOR_MULTIPLE_ELEMENTS,
handlerRectanglesFromCoords,
handlerRectangles,
getElementBounds,
getCommonBounds,
} from "../element";
@ -559,7 +560,7 @@ const isVisibleElement = (
zoom: number;
},
) => {
const [x1, y1, x2, y2] = getElementAbsoluteCoords(element);
const [x1, y1, x2, y2] = getElementBounds(element);
// Apply zoom
const viewportWidthWithZoom = viewportWidth / zoom;