Open lucasvallenet opened 2 years ago
I made the requested changed.
I also blended the addScrollUpEvent
/ addScrollDownEvent
to a unique function. There is only one scroll listener and if we want to know when we scroll up, we usually also want to know when we scroll down...
All that is missing is to exclude
/www/assets/styles
.
Didn't it reset on [0610a7d] ?
Didn't it reset on [0610a7d] ?
Oh, you reverted changes. I would suggest rebasing the master
branch and dropping commits like that. Makes for a cleaner history.
š Thanks for the PR!
Some things worry me about this:
document
or window
I guess, but if you setup a "start" event on a div that later disappears, the listener's still there and that's no good.Can you provide a concrete example where this would be useful aside from a global resizeend
with a defined debounce delay? I wonder if that sort of custom event with a debounce should be done manually where needed only?
Regarding the scroll up/down events, it works well but I wonder if it's the right place for such a feature. Maybe it should be inside the Scroll
module of the project instead? Also, we may want to prevent calling addScrollDirectionEvents
multiple times on the same EventTarget.
By the way, it didn't work right away during my tests. I figured some variables/functions calls didn't exist, it's now fixed ā
Outcome from meeting on 2022-10-05 Status: On hold
Add
/utils/events.js
withaddStartEvent
andandEndEvents
utils to easily bind an even on start/end with a debounce delay. Also addedaddScrollUpEvent
andaddScrollDownEvent
to easily listen when the scroll direction updatesUsage of events :
addStartEvent
addEndEvent
addScrollUpEvent
addScrollDownEvent