Closed bgfist closed 4 years ago
I got some idea:
const drags$ = mousedown$.map(md => {
const moves$ = mousemove$.startWith(md).endWhen(mouseup$);
const moveEnd$ = moves.last();
return [moves$, moveEnd$];
});
const drag$ = drags$.map(drags=> drags[0]).flatten();
const dragEnd$ = drags$.map(drags=> drags[1]).flatten();
...
I want the
dragEnd
stream to deal with some logic whenmouseup
, is there anysample
operator like rxjs ?