How can I determine if a scroll event was caused by my own animation, or it was caused by a user's scroll?
I have a scrollable area, which acts like a CV control knob, where the user can scroll and directly map to a DOM element's size, left, and top
If a scroll event ends inside specific bounds, I want to "snap" to a nearby position, with a granular tween that modifies the same scrollable area's scrollTop.
While this transition is occurring, I want any user scroll to immediately override the animation, so that the user regains control
I feel like I'm very close to a solution, and I noticed that my usecase involves floating point increments, where a user scroll will only increase by full integers. I'm not sure if this is useful, and it feels like a hack to abuse, but I'm really looking for ANY WAY that I can discriminate between a user scrollTop change, and my animation's scrollTop change
.trigger()call. This call would be present in code-made calls, but absent from event calls.