Long press and multitouch in Evothings apps

Ask, and ye shall receive.
Posts: 2
Joined: 06:24, 21 Dec 2015

Long press and multitouch in Evothings apps

Postby pmccain » 18:33, 21 Dec 2015

Is multitouch not supported or is there some special way to implement it? Using iOS 9 alongside evothings workbench.

Also, is there other functionality I can use with buttons I create in my app besides "onclick"? I'd like to have one event happen when the user presses a button and another when it is released. Is this possible? Currently every app I've tested gets confused and doesn't register any kind of button click if the user presses and holds

Posts: 8
Joined: 00:04, 12 Nov 2015

Re: Long press and multitouch in Evothings apps

Postby sarkreth » 22:19, 21 Dec 2015

Is your intended interface a mouse or a touchscreen? If it's the latter, read up on touch events:
http://www.javascriptkit.com/javatutors ... ents.shtml
I think touchstart and touchend are what you're looking for to implement a "long press".

I haven't done anything with multiple fingers (I assume that's what you mean by "multitouch") myself, but it seems you could check the number of elements in the events.changedTouches[] array and that will tell you how many points are on the screen.

User avatar
Posts: 256
Joined: 20:49, 18 Nov 2013

Re: Long press and multitouch in Evothings apps

Postby micke » 20:27, 29 Dec 2015

For multitouch, long press and other gestures, I recommend the library hammer.js:


If you want to implement touch events at the lowest level in JavaScript, you can find lots of tutorials on the Internet, for example:

https://www.google.se/search?q=html5+mu ... h+tutorial

Best, Mikael

Return to “Questions and answers”

Who is online

Users browsing this forum: Bing [Bot] and 6 guests