fix visibility check on rotated elements (#1799)
This commit is contained in:
parent
a357d00bbe
commit
482fa2d90f
@ -15,6 +15,7 @@ import {
|
|||||||
OMIT_SIDES_FOR_MULTIPLE_ELEMENTS,
|
OMIT_SIDES_FOR_MULTIPLE_ELEMENTS,
|
||||||
handlerRectanglesFromCoords,
|
handlerRectanglesFromCoords,
|
||||||
handlerRectangles,
|
handlerRectangles,
|
||||||
|
getElementBounds,
|
||||||
getCommonBounds,
|
getCommonBounds,
|
||||||
} from "../element";
|
} from "../element";
|
||||||
|
|
||||||
@ -559,7 +560,7 @@ const isVisibleElement = (
|
|||||||
zoom: number;
|
zoom: number;
|
||||||
},
|
},
|
||||||
) => {
|
) => {
|
||||||
const [x1, y1, x2, y2] = getElementAbsoluteCoords(element);
|
const [x1, y1, x2, y2] = getElementBounds(element);
|
||||||
|
|
||||||
// Apply zoom
|
// Apply zoom
|
||||||
const viewportWidthWithZoom = viewportWidth / zoom;
|
const viewportWidthWithZoom = viewportWidth / zoom;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user