This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Joshua Tucker
Posted Jun 20 - Read on Facebook

Anyone encountered issues with the use of the Clear iOS Browser + Cactus + Events.Drag?

I have both speedX and speedY of said layer set to zero because I'm scaling the layer based on a mapRange. However when I attempt the drag on my iPad using Clear iOS Browser, it doesn't recognize the drag. However, if I were to set either of the speeds to 1, the layer will move around just fine.

Any thoughts? Thanks!

Edit: I should note that the drag is recognized just fine if I use my mouse + desktop browser.

4 Comments

Koen Bok

It's hard to exactly understand what is happening here without seeing it. Can you maybe show some code or a movie?

When the dragging speed is set to 0, it should not drag at all, so that sounds correct.

Joshua Tucker

Sure. Here's a video + my explanation. Thanks for the help. http://cl.ly/0R082e0X1c1l

Koen Bok

Hey Joshua, if I had to guess I think this is because it's listening for the wrong events. On the desktop it's "click" but on the iPad it's "touchstart".

Now, if you are using the default draggable that should work though because I built that in. In this case it could be that the clear app doesn't throw these events like Safar mobile. So could you check if it does work in Safari on mobile?

I suspect they'll behave the same and then I'd be interested to see if/when the events are called. To figure that out you can log something like this:

theLayer.on(Events.DragStart, function() { console.log("Events.DragStart") }
theLayer.on(Events.DragEnd, function() { console.log("Events.DragEnd") }

Now run them on both desktop and mobile and see if they print something. To get console output from your iPad, connect it with USB and select the iPad Console Output from the Safari > Debug Menu.

If this doesn't help us figure it out I'd ask you to send me the code and I can figure out exactly what happens. You can mail it to koen@madebysofa.com.

Joshua Tucker

Sorry for the late response. Whirlwind this week :).

I'll log the events and get back to you. Thanks again for the help.

Read the entire post on Facebook