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

What is Framer? Join the Community
Return to index
Flip Sos
Posted Aug 31 - Read on Facebook

What's the easiest way to create a "hold" gesture without hammer.js?

14 Comments

Alex Hazel

Do you just want to use another framework that isn't Hammer.js? You could also take a look at QuoJS -- http://quojs.tapquo.com/

Alex Hazel

Also, there is a jQuery plugin called jGestures that could possibly be implemented as well: https://jgestures.codeplex.com/

Flip Sos

Mmmhm, thanks for the tips! I'd like to avoid extra frameworks and am looking for a framer way. Is there no way this could be achieved?

Alex Hazel

DId you take a look at the Framer examples on their webpage yet? -- http://examples.framerjs.com/#animation-basics.framer

Flip Sos

I found a way : ) I was using the search function and it couldn't find anything when I typed in "Hold" but I was going through the "gesture" results and found this: http://codepen.io/stakes/pen/ubfnw

Alex Hazel

Something like this? Is this what you mean by a "hold"....Essentially defining a layer as being "Draggable"? -- http://examples.framerjs.com/#shadow-dragging.framer

Flip Sos

Thanks for your help Alex! Is there an easy way to detect if a layer is moving?

Alex Hazel

Are you interacting with the layer or is it moving by itself? Would one of the built in Utilities that Framer offers help you out? -- http://framerjs.com/docs.html#utilities

Alex Hazel

You could run a loop with a delay to continually check if the x,y coordinates are the same or different from the last time you checked to see if it was still moving? That is my best guess....

Flip Sos

Yeah, that's what I was thinking as well, thought there might be an easier solution. I am Interacting with the layer. I think there even was an example by Koen sometime.

Alex Hazel

I seem to remember seeing a similar example as well. Not sure where it is though

Cemre Güngör

FYI we prefer you participate in this group with your own name

Koen Bok

Yeah or come op with a nice pseudonym if you have a problem with that. But this looks spammy and weird.

Edward Sanchez

So, after a lot of fiddling, and likely resulting in a rather messy solution, I now have several Touch Events that don't conflict with each other.
https://gist.github.com/edwardsanchez/1da746f64070fa5c4288#file-touch-events

Read the entire post on Facebook