Skip to content
This repository has been archived by the owner on Dec 6, 2018. It is now read-only.

Finalize Custom Behaviors API #5

Closed
ryanfitzer opened this issue Apr 18, 2013 · 0 comments
Closed

Finalize Custom Behaviors API #5

ryanfitzer opened this issue Apr 18, 2013 · 0 comments

Comments

@ryanfitzer
Copy link
Owner

You can already supply your own custom behaviors:

var meCustom = multiEvent({
    pointer: 'MSPointerOver',
    mouse: 'mouseover',
    touch: 'touchstart'
});

I'd like to also support each input declaring multiple events per input:

var meCustom = multiEvent({
    pointer: [ 'MSPointerOver', 'MSPointerDown' ],
    mouse: 'mouseover',
    touch: 'touchstart'
});

Pointer events are the only inputs I see as benefiting from this:

If event is pointerdown and input is touch
    Do this thing
Else if event is pointerover and input is mouse
    Do that thing

Arrays are supported in the resolveEvents function. The switch statement in MultiEvent.prototype.resolve is where the support needs to be added.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant