const move$ = fromEvent(document, 'mousemove') | |
const down$ = fromEvent(document, 'mousedown') | |
const up$ = fromEvent(document, 'mouseup') | |
const mergeFn = downs => { // In case you want the first position | |
// If you want to deltas between start and end, you might want a map that captures downs versus moves | |
return move$.pipe(takeUntil($ups)); | |
}; | |
const paints$ = move$.pipe( | |
mergeMap(mergeFn) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment