Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.