Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const drag$ = touchstart$.pipe(
- switchMap(
- (start) => {
- return touchmove$.pipe(map(move => {
- move.preventDefault();
- return {
- left: move.clientX - start.offsetX,
- top: move.clientY - start.offsetY
- }
- }),
- takeUntil(touchend$));
- }));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement