svelte-dnd-action
Advanced tools
Comparing version 0.2.6 to 0.2.7
@@ -379,3 +379,4 @@ (function (global, factory) { | ||
function updateMousePosition(e) { | ||
mousePosition = {x: e.clientX, y: e.clientY}; | ||
const c = e.touches? e.touches[0] : e; | ||
mousePosition = {x: c.clientX, y: c.clientY}; | ||
} | ||
@@ -398,2 +399,3 @@ const {scrollIfNeeded: scrollIfNeeded$1, resetScrolling: resetScrolling$1} = makeScroller(); | ||
window.addEventListener('mousemove', updateMousePosition); | ||
window.addEventListener('touchmove', updateMousePosition); | ||
loop(); | ||
@@ -408,2 +410,3 @@ } | ||
window.removeEventListener('mousemove', updateMousePosition); | ||
window.removeEventListener('touchmove', updateMousePosition); | ||
mousePosition = undefined; | ||
@@ -410,0 +413,0 @@ window.clearTimeout(next$1); |
@@ -33,3 +33,3 @@ { | ||
"description": "*Awesome drag and drop library for Svelte 3 (not using the browser's built in dnd, thanks god): Rich animations, nested containers, touch support and more *", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
"dependencies": { | ||
@@ -36,0 +36,0 @@ "acorn": "^7.1.1", |
@@ -12,3 +12,4 @@ import {makeScroller} from "./scroller"; | ||
export function updateMousePosition(e) { | ||
mousePosition = {x: e.clientX, y: e.clientY}; | ||
const c = e.touches? e.touches[0] : e; | ||
mousePosition = {x: c.clientX, y: c.clientY}; | ||
} | ||
@@ -31,2 +32,3 @@ const {scrollIfNeeded, resetScrolling} = makeScroller(); | ||
window.addEventListener('mousemove', updateMousePosition); | ||
window.addEventListener('touchmove', updateMousePosition); | ||
loop(); | ||
@@ -41,2 +43,3 @@ } | ||
window.removeEventListener('mousemove', updateMousePosition); | ||
window.removeEventListener('touchmove', updateMousePosition); | ||
mousePosition = undefined; | ||
@@ -43,0 +46,0 @@ window.clearTimeout(next); |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
123760
2588