0

In my konva app, users are having trouble tapping on icons ... frequently konva issues a dragStart event instead of a tap event (presumably due to the length of time the user's finger is down or the fact that their finger moved slightly during their tap).

Is there a way to tune the parameters for wait time and/or movement distance under which a tap will be issued?

I see that there is a dragDistance which postpones issuing a dragStart until the user has moved the given number of pixels, but I haven't found a way to tell it to issue a tap event under a given number of pixels.

Eric
  • 1,414
  • 3
  • 16
  • 35
  • Hi. Sorry, your question is not 100% clear for me. But I think `dragDistance` can fix your issue. Some value around 5-6 works very good. – lavrton Jun 24 '16 at 02:26
  • Ah, interesting ... upon further testing, I see that I was mistaken. For the most part, konva will indeed issue a `tap` event for movements less than `dragDistance`. However, one of my objects has stopped issuing them for regular taps. However, if I pound on it 2-3 times in rapid succession, I will still get a `tap` event. Meanwhile, my stage responds to taps exactly how I would expect. Does behavior like that ring any sort of bells with you? – Eric Jun 24 '16 at 14:27

1 Answers1

2

Ah ... it turns out that in our app, we were disabling the hit graph on our layer on touchstart and as a result, the intersection test returned a different object on touchend than on touchstart, so it properly did not register a tap event.

So, all is well with konva. :o)

Just don't disable your hit graph on touchstart. ;o)

Eric
  • 1,414
  • 3
  • 16
  • 35