Skip to content

Commit

Permalink
If view extends beyond window boundaries, do not add that difference …
Browse files Browse the repository at this point in the history
…to the insets (#177)
  • Loading branch information
TheAlmightyBob committed Mar 7, 2021
1 parent 1d8a49f commit dfffa92
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@

windowInsets.top = Math.max(windowInsets.top - visibleRect.top, 0);
windowInsets.left = Math.max(windowInsets.left - visibleRect.left, 0);
windowInsets.bottom = Math.max(visibleRect.top + view.getHeight() + windowInsets.bottom - windowHeight, 0);
windowInsets.right = Math.max(visibleRect.left + view.getWidth() + windowInsets.right - windowWidth, 0);
windowInsets.bottom = Math.max(Math.min(visibleRect.top + view.getHeight() - windowHeight, 0) + windowInsets.bottom, 0);
windowInsets.right = Math.max(Math.min(visibleRect.left + view.getWidth() - windowWidth, 0) + windowInsets.right, 0);
return windowInsets;
}

Expand Down

0 comments on commit dfffa92

Please sign in to comment.