Created
July 20, 2019 20:23
-
-
Save DimitryDushkin/bc195c8fda188ca63a967d7445fd73a2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return down$.pipe( | |
mergeMap(e => { | |
startPosition = startPosition || { x: e.pageX, y: e.pageY }; | |
return move$.pipe( | |
takeUntil(up$), | |
map(e => ({ | |
x: e.pageX - startPosition.x, | |
y: e.pageY - startPosition.y | |
})) | |
); | |
}) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment