So I have some event streams:
let mouseUps = $(window)
.asEventStream('mouseup');
let mouseDowns = $(window)
.asEventStream('mousedown');
let mouseMoves = $(window)
.asEventStream('mousemoves');
let drags = mouseDowns
.flatMapLatest(() => mouseMoves.takeUntil(mouseUps));
let clicks = $(window)
.asEventStream('click')
.onValue(() => doThing());
I'd like to ignore clicks that get triggered right after a drag ends. I feel like there has go to be a fairly simple way to do this, but I'm still struggling with some of the core concepts.