Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. const drag$ = touchstart$.pipe(
  2. switchMap(
  3. (start) => {
  4. return touchmove$.pipe(map(move => {
  5. move.preventDefault();
  6. return {
  7. left: move.clientX - start.offsetX,
  8. top: move.clientY - start.offsetY
  9. }
  10. }),
  11. takeUntil(touchend$));
  12. }));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement