sambaker / awe-core

Artefact Web Extensions JS core
MIT License
2 stars 1 forks source link

Implement onClicked and onSelected events on draggable elements #8

Open shyam-habarakada opened 12 years ago

shyam-habarakada commented 12 years ago

The following a common scenarios with elements that are made draggable via Awe.enableDrag :

@sambaker what do you think of exposing these events natively in the Awe.enableDrag feature? The parameters for determining these can be part of the config passed in. Is this something you had already thought of and discarded for some reason?

shyam-habarakada commented 12 years ago

Further, when these new events and config parameters are specified, onDragMove should not be triggered until the drag thresholds have been met. We could perhaps even skip onDragStart and onDragEnd as well if the interaction was a selection or a simple click.

sambaker commented 12 years ago

Valid suggestions, no reason they can't be added. I'll look into the best way to do this.

shyam-habarakada commented 12 years ago

Great.

ericcroskeyartefact commented 12 years ago

This seems like it would be a nice enhancement. It gets complex when you realize that for a particular use you may want to:

fire the event based on a duration fire the event based on a distance fire the event based on duration || distance fire the event based on duration && distance

so an implementation would ideally allow for a config that could specify all four cases.

ej

-----Original Message----- From: shyam-habarakada [mailto:reply@reply.github.com] Sent: Wednesday, August 01, 2012 7:08 AM To: Eric Juvet Subject: [awe-core] Implement onClicked and onSelected events on draggable elements (#8)

The following a common scenarios with elements that are made draggable via Awe.enableDrag :

@sambaker what do you think of exposing these events natively in the Awe.enableDrag feature? The parameters for determining these can be part of the config passed in. Is this something you had already thought of and discarded for some reason?


Reply to this email directly or view it on GitHub: https://github.com/sambaker/awe-core/issues/8