Skip to content

Commit

Permalink
fix(esf): fixed bottom and right extend in auto position strategy #7742
Browse files Browse the repository at this point in the history
  • Loading branch information
igdmdimitrov committed Aug 7, 2020
1 parent 4b83583 commit cc8a4fc
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -119,7 +119,7 @@ export class AutoPositionStrategy extends BaseFitPositionStrategy {
*/
private horizontalPush(connectedFit: ConnectedFit): number {
const leftExtend = connectedFit.left;
const rightExtend = connectedFit.right - connectedFit.viewPortRect.right;
const rightExtend = connectedFit.right - connectedFit.viewPortRect.width;
// if leftExtend < 0 overlay goes beyond left end of the screen. We should push it back with exactly
// as much as it is beyond the screen.
// if rightExtend > 0 overlay goes beyond right end of the screen. We should push it back with the
Expand All @@ -141,7 +141,7 @@ export class AutoPositionStrategy extends BaseFitPositionStrategy {
*/
private verticalPush(connectedFit: ConnectedFit): number {
const topExtend = connectedFit.top;
const bottomExtend = connectedFit.bottom - connectedFit.viewPortRect.bottom;
const bottomExtend = connectedFit.bottom - connectedFit.viewPortRect.height;
if (topExtend < 0) {
return Math.abs(topExtend);
} else if (bottomExtend > 0) {
Expand Down

0 comments on commit cc8a4fc

Please sign in to comment.