From 7ebc3a8e97b2d11137225d866ee359d3749538e9 Mon Sep 17 00:00:00 2001 From: Daniel Weck Date: Tue, 26 May 2020 09:49:00 +0100 Subject: [PATCH] hotfix: previous commit introduced a possible unwanted x/y coordinate offset for library/reader windows --- src/common/rectangle/window.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/rectangle/window.ts b/src/common/rectangle/window.ts index d5532e97b..c793c71c9 100644 --- a/src/common/rectangle/window.ts +++ b/src/common/rectangle/window.ts @@ -32,10 +32,10 @@ export const normalizeRectangle = (winBound: Rectangle) => { // note: 0 and NaN are falsy (as well as null and undefined), // positive and negative numbers are truthy. if (!winBound.x) { - winBound.x = rect.x; + winBound.x = 0; // rect.x can push window frame outside of visible viewport } if (!winBound.y) { - winBound.y = rect.y; + winBound.y = 0; // rect.y can push window frame outside of visible viewport } if (!winBound.width) { winBound.width = rect.width;