I was too quick and didn't check out the full source properly (just
scrolled through it roughly). So I kinda read about the Mobile/Click
taking over, but not really :)
It works pretty cool. The delay of 1 ms is a bit too less though, a
little more and my tests so far haven't failed me! Cool

I see Mobile/Click is only for iOS, and read this thing doesn't occur
with Android devices (I don't have one around, so can't test atm)?
In the code there's the comment that Android doesn't have a touch
delay, but I don't see the relation with the Click override and only
iOS?

On Feb 26, 6:10 pm, Christoph Pojer <[email protected]> wrote:
> I really need to write the new implementation of swipe I've been thinking
> about for a while - it will be a billion times more awesome :)
>
> About your problem: Given that you are using Mobile, you are using
> Custom-Event too (= you are a PowerTools! user, heh!) and those two in
> conjunction provide you with everything you need. Note that you'll need
> Mobile/Click and normal anchors with normal links (ie. without click events)
> will likely still fire, if everything is handled through the mootools event
> system and Custom-Event you can do something like this:
>
> el.addEvent('swipe', function(){
>   // swipe occurred, block all other custom events for a bit
>   Element.disableCustomEvents();
>
>   // Enable again after touchend was fired (ie. right in the next execution
> chain through a delay).
>   (function(){
>     Element.enableCustomEvents();
>   }).delay(1);
>
> });
>
> If you use Mobile/Click, the 'click' event in MooTools becomes a custom
> event based on touchend. With the feature in Custom-Event to disable a
> custom event, you can disable all custom events that have an onEnable and
> onDisable method. The custom touchend in mootools-mobile handles this
> properly. See the bottom of the README
> here:https://github.com/cpojer/mootools-custom-event
> andhttps://github.com/cpojer/mootools-mobile/blob/master/Source/Touch/To...
> for more information on how this is actually implemented.
>
> Your problem is exactly why implemented the above APIs. I'm not set on them,
> they might not be the cleanest and best implementations for this, but I have
> found them to work pretty good. Please let me know if it works :)

Reply via email to