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

What is Framer? Join the Community
Return to index
玉青张
Posted Jun 03 - Read on Facebook

Hello, guys here, I‘m a novice and have a problem when prototyping, do you know how to differentiate click and long-press? :)

3 Comments

Zoltan Ray

You can use something like hammer.js for gesture events, or add logic to touchStart, touchEnd etc. to differentiate. A simple example is here: http://share.framerjs.com/1m35l7mox4ij/ although I'm sure there's more elegant ways to do this

Balraj Chana

How about adding an interval or delay to touchStart and then clearing it on touchEnd? http://share.framerjs.com/3lde4ycizv8f/

Irwansyah

The difference is only on the timer length

Read the entire post on Facebook