-
Notifications
You must be signed in to change notification settings - Fork 69
Add custom JS events #122
base: master
Are you sure you want to change the base?
Add custom JS events #122
Conversation
mcaskill
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional suggestions:
- Should there be functions in place to disable custom events or remove base the event listeners that dispatch them?
- I think the
addScrollUpEventandaddScrollDownEventcould be refactored to use the same event listener onscroll.
Given the scope of this pull request, changes to /www/assets/styles should be excluded.
|
I made the requested changed. I also blended the |
mcaskill
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All that is missing is to exclude /www/assets/styles.
Didn't it reset on [0610a7d] ? |
Oh, you reverted changes. I would suggest rebasing the |
0610a7d to
d916ad0
Compare
|
👋 Thanks for the PR! addStartEvent / addEndEventSome things worry me about this:
Can you provide a concrete example where this would be useful aside from a global addScrollDirectionEventsRegarding 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 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
|
Add
/utils/events.jswithaddStartEventandandEndEventsutils to easily bind an even on start/end with a debounce delay. Also addedaddScrollUpEventandaddScrollDownEventto easily listen when the scroll direction updatesUsage of events :
addStartEvent
addEndEvent
addScrollUpEvent
addScrollDownEvent