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
Long press and multitouch in Evothings apps
Re: Long press and multitouch in Evothings apps
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.
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.
Re: Long press and multitouch in Evothings apps
For multitouch, long press and other gestures, I recommend the library hammer.js:
http://hammerjs.github.io/
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
http://hammerjs.github.io/
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: Google [Bot] and 24 guests