x-intersect:leave.full and .half and default or .any #2510
mokhosh
started this conversation in
3. Feature Ideas
Replies: 1 comment 3 replies
-
I don't think it's possible. X-intersect.half triggers when 50% of the element intersects the viewport. The plugin uses the interectionObserver api which doesn't know if you are scrolling in or out the viewport (basically it fires both ways). The only thing you can detect is when the element leaves the viewport in full (threshold = 0 + isInterecting = false). |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I think we can use
x-intesect
for implementing some cool features that were very complicated before. Like positioning a popup if part of it is not visible on the page.Right now
x-intesect:leave
only triggers when 100% of the element is hidden, and you cannot control it like normalx-intersect
with modifiers, otherwise we could do things likex-intersect:leave="$el.styles.bottom = 0"
.Would love to hear your thoughts on how useful we can make this and how far we can go with this idea.
Beta Was this translation helpful? Give feedback.
All reactions