Hello!
I'm working on enabling a div to "pan" — that is, to scroll in both vertical and horizontal directions simultaneously. This functionality is particularly relevant for trackpad users. For a clearer understanding of what I'm aiming for, please refer to the attached demo video.
At present, I've managed to implement a grab feature, but the scrolling is restricted to either vertical or horizontal movement, not both.
I realize that overriding the default scrolling behavior might require JavaScript, considering it's the standard way these interactions are handled.
Despite my efforts, I've hit a roadblock. I'd greatly appreciate any guidance or assistance you can offer on this matter.
Thank you
PS: I had to add a timeout in the codepen demo to fix a weird bug so it needs a second to load.
demo-gsap-animation.mov