Skip to content

Commit

Permalink
hotfix: previous commit introduced a possible unwanted x/y coordinate…
Browse files Browse the repository at this point in the history
… offset for library/reader windows
  • Loading branch information
danielweck committed May 26, 2020
1 parent c1d32cb commit 7ebc3a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/rectangle/window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7ebc3a8

Please sign in to comment.