4 ms·
Sure, you can do that. If it's not how you want it to be, just tweak it. http://jsfiddle.net/staltz/U2j4D/8/ http://jsfiddle.net/staltz/U2j4D/8/
by staltz 12y ago
Sure, you can do that. If it's not how you want it to be, just tweak it. http://jsfiddle.net/staltz/U2j4D/8/ http://jsfiddle.net/staltz/U2j4D/8/
- eridius 12y agoThank you, that behaves a lot better. It seems a bit odd that the multiClickStream emits a `0` 200ms after the last click, but I guess you can add the filter to the multiClickStream directly and let the button clear its own text a different way. http://jsfiddle.net/U2j4D/17/ http://jsfiddle.net/U2j4D/17/ So more than 4 lines of code, but I'm glad to see it's quite doable.
- Groxx 12y agoInteresting implementation - I'm just starting to poke into reactive, things like this help me think differently :) That said, this is not the same thing as a double-click handler. This is a single click plus a double click when you click twice. Typically when you do double-click handlers you delay single-click until it's a confirmed not-double-click. I think I have an idea of how to make that work here, but do you have a preferred approach?