You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes you need a fake scroll container instead of window, for things like basement menus or certain page transitions. This requires tracking an element's scroll events, rather than window.
Thankfully, the project I'm working on has down away with its scrolljacked container. But I thought I'd raise this for down the road.
Normally, I'd use my own morlock.js for this, but I'm tired of maintaining it so I put this TODO on your plate instead :)
Yeah so scoped element scrolling, was more or less was waiting for a usecase to implement this. Simple enough, the question becomes what is an elegant API.
My gut tells me it should be part of the track API.
This idea of a scoped tracked element adds some significant complexity (but this project has 0 complexity so far so I am not worried) to this code base, since under the hood I am taking care of untracking and whatnot already, but I think It could turn out quite nice.
Sometimes you need a fake scroll container instead of window, for things like basement menus or certain page transitions. This requires tracking an element's scroll events, rather than window.
Thankfully, the project I'm working on has down away with its scrolljacked container. But I thought I'd raise this for down the road.
Normally, I'd use my own morlock.js for this, but I'm tired of maintaining it so I put this TODO on your plate instead :)
The important parts are: https://github.com/tdreyno/morlock.js/blob/master/streams/scroll-stream.js#L15
And: https://github.com/tdreyno/morlock.js/blob/master/core/dom.js#L42-L52
Thanks for this simple project 🍻
The text was updated successfully, but these errors were encountered: