Raynos / dom-delegator

Decorate elements with delegated events
MIT License
57 stars 16 forks source link

common events: add drag and drop related events #9

Closed humanchimp closed 10 years ago

Raynos commented 10 years ago

Which of these are noisy ?

I think dragenter & dragleave are going to be very high constant volume.

Where as dragstart and dragstop are actually bounded by how fast a human clicks his mouse.

humanchimp commented 10 years ago

I think I understand the question. I think you mean that some of these events will come in large volume. It's true, but I didn't understand what in particular mattered about the volume of events.

I added these because I'm playing around with mercury, and I got stuck on drag and drop, and this got me unstuck. Maybe there is a way I can do this without this change. I want to handle some of these events.

I think the drag event is the noisiest one. The dragenter and dragleave events might be noisy, but they are important. I would argue that most if not all of these events are important for some applications.

Raynos commented 10 years ago

@humanchimp you are editing the list of default events. We should not opt into noisy events by default.

You can always call delegator.listenTo('drag') to opt into these events at run time without editing this array.

humanchimp commented 10 years ago

I see. .listenTo is probably good enough for me. I actually don't need to listen to the drag event, but I need to listen to some of the others.