Page 1 of 1

Touch screen connect ? dojo.connect(node, dojox.gesture.tap, function(e){}); ?

Posted: 16 May 2021, 13:52
by bidulpik
Hi,
have you already tried to use mobile feature has touchescreen ?
like
dojo.connect(node, dojox.gesture.tap, function(e){});

what were your solution ?

all the best

Re: Touch screen connect ? dojo.connect(node, dojox.gesture.tap, function(e){}); ?

Posted: 16 May 2021, 16:25
by Tisaac
bidulpik wrote: 16 May 2021, 13:52 Hi,
have you already tried to use mobile feature has touchescreen ?
like
dojo.connect(node, dojox.gesture.tap, function(e){});

what were your solution ?

all the best
Out of curiosity, why would you need that ?

Re: Touch screen connect ? dojo.connect(node, dojox.gesture.tap, function(e){}); ?

Posted: 17 May 2021, 08:00
by bidulpik
Hi,

in the backgammon on computer, tips are displayed on mouseover.
It is not possible on mobile.
I'd like to add a specific mobile action for tips.
May be gesture.tap.hold or something like that.

should I use instead a onmousedown and a setInterval ?

all the best

Re: Touch screen connect ? dojo.connect(node, dojox.gesture.tap, function(e){}); ?

Posted: 17 May 2021, 09:32
by XCID
If you tap and and hold for a second or so, the tooltip should be displayed on mobile devices.

Re: Touch screen connect ? dojo.connect(node, dojox.gesture.tap, function(e){}); ?

Posted: 17 May 2021, 09:56
by bidulpik
I've tried

dojo.query('.token').connect('dojox.gesture.tap.hold', this, 'hlodTap');

but it doenst work (even with tap, it is not detected by my mobile :s )

Re: Touch screen connect ? dojo.connect(node, dojox.gesture.tap, function(e){}); ?

Posted: 17 May 2021, 11:24
by Tisaac
XCID wrote: 17 May 2021, 09:32 If you tap and and hold for a second or so, the tooltip should be displayed on mobile devices.
It's too bugy.
On my current game, I've developped a "help/safe mode" to overcome this issue.
Basically you have a switch somewhere near top of screen to toggle this mode on/off, and once you are in this mode :
- all clicks related to an action are disabled , so no misclicks possible while trying to display the tooltip
- "tooltipable" elements get an "?" icon added on top left (and an "?" cursor)
- clicking on such an element now display the corresponding tooltip
- clicking again on it or anywhere else remove the tooltip.
I can share some parts of the code if you are interested.

Re: Touch screen connect ? dojo.connect(node, dojox.gesture.tap, function(e){}); ?

Posted: 19 May 2021, 02:05
by Victoria_La
You should add this to recipies wiki