From 482fa2d90f9f56ba9fa0dd2cc458f3af232c5598 Mon Sep 17 00:00:00 2001 From: Daishi Kato Date: Mon, 22 Jun 2020 17:00:09 +0900 Subject: [PATCH] fix visibility check on rotated elements (#1799) --- src/renderer/renderScene.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer/renderScene.ts b/src/renderer/renderScene.ts index 309ee971..4af2042a 100644 --- a/src/renderer/renderScene.ts +++ b/src/renderer/renderScene.ts @@ -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;