seansly
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by seansly
-
-
I still get the issue with onClick as the only callback. It seems to not "break" as often on codepen, but when I run this locally it breaks every time. If you refresh the page after loading a mobile view, it should break on codepen though.
Quotelike why are you calling .enable().update() in the onPress?
I started building this off an old gsap example and from what I can tell, since I technically need to adjust the viewbox window instead of actually dragging something around... the draggable is attached to a proxy element that gives me pointer information and it doesn't work correctly unless I have that .enable().update() in the onPress. If that's removed you should notice the viewbox jumping around.
the gsap reference is here:
-
I've updated the codepen with the relevant zoom/drag code.
-
It seems to happen to me on an actual phone too. What I was trying to get to work was just a zoom in on click, zoom out on second click. With the multiple events firing it instantly zooms itself out.
-
loading the codepen and then turning on the mobile view, refresh the page, then click and you should get two events. I don't think this is intended but maybe I just have it set up wrong. It doesn't happen outside of mobile view.
console:
It seems like the double event happens on a phone or when the browsers mobile mode is set to a phone size specifically, responsive wont trigger two events
Any advice?
pointerup fired for draggable's onclick in mobile view
in GSAP
Posted
Thanks,
Yeah this seems to do the trick.