Is it possible to ignore single touchend event?
pablobirukov opened this issue · 2 comments
pablobirukov commented
For test purposes I need to trigger single touchend event in several cases. The library throws an error at end
handler at coords.offset[0]
Is it possible to ignore single touchend
if (!coords.offset) return;
or it brakes common sense?
Thanks.
ezhlobo commented
@R00GER I think you talk about this part in end
method:
if (coords.offset[0] < Tap.options.fingerMaxOffset && coords.offset[1] < Tap.options.fingerMaxOffset && !utils.fireFakeEvent(e, Tap.options.eventName)) {
Or more friendly:
if (coords.offset[0] < Tap.options.fingerMaxOffset
&& coords.offset[1] < Tap.options.fingerMaxOffset
&& !utils.fireFakeEvent(e, Tap.options.eventName)) {
If we return before this we will not fire tap
event. You can share your case and I'll try to help.
pablobirukov commented
@ezhlobo yes. I hacked the library in the same manner for test purposes.
But now I would agree on current solution because bad code isn't a reason to make any exceptions in library.
Thanks for attention.