Skip to content

Commit

Permalink
only cleanup to take less on screen and be more visible
Browse files Browse the repository at this point in the history
  • Loading branch information
senpl committed Apr 14, 2024
1 parent 4ad8136 commit f484c50
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/driver/src/dom/visibility.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,17 +348,17 @@ const elIsOutOfBoundsOfAncestorsOverflow = function ($el, $ancestor = getParent(
}

if (
// target el is to the right of the ancestor's visible area
// target el is to the right of the ancestor's visible area
(elProps.left >= (ancestorProps.width + ancestorProps.left)) ||

// target el is to the left of the ancestor's visible area
((elProps.left + elProps.width) <= ancestorProps.left) ||
// target el is to the left of the ancestor's visible area
((elProps.left + elProps.width) <= ancestorProps.left) ||

// target el is under the ancestor's visible area
(elProps.top >= (ancestorProps.height + ancestorProps.top)) ||
// target el is under the ancestor's visible area
(elProps.top >= (ancestorProps.height + ancestorProps.top)) ||

// target el is above the ancestor's visible area
((elProps.top + elProps.height) <= ancestorProps.top)
// target el is above the ancestor's visible area
((elProps.top + elProps.height) <= ancestorProps.top)
) {
return true
}
Expand Down

0 comments on commit f484c50

Please sign in to comment.