Hi all!
First time posting here, been fiddling with GSAP on and off for a month or two, and been playing with the draggables lately.
I'm trying to get a scrollable div which contains a number of 'slots' which can contain 'items', but where I can drag the items in it around the page (to other 'slots' or to areas outside of the scrollable div)
This means I've had to make a clone of the item attached to an 'external' div and make that draggable so that I can 'escape' the scrollable div.
I've also had to make a custom click event handling system as I want to be able to take different actions on click as well as drag
I've got two issues, one small, one big...
The small issue:
Dragging to the edge of the scrollable div doesn't scroll the div.
I've got some event preventDefaults on the mousedown and mousemove events but thats so that when dragging, it doesn't highlight all the text on the page you drag past.
The big issue:
Dragging the item over a slot hidden by overflow-y still registers as a hit using hitTest, even though the div is not visible on the page. (Try dragging the red box underneath the container div, and watch the hit result above (where it initially says "hi") )
----
I'm using Vue 3 with GSAP, the codepen is a de-vue-ified version of the drag script and click event handlers, and a super basic static example of the item/slot setup (in reality I've got them 4-5 per row for multiple rows, but not needed for the pen) and I've got it replicating the same issue.
Hopefully I've transcribed enough of my code to find the issue xD
Please let me know if anyone has any ideas for solutions, and if any more info is needed.
Thanks in advance ❤️