Fix mobile event

This commit is contained in:
Harvey committed 2022-01-10 09:35:46 +08:00
1 parent 5c4d71cc7a
commit 53da53c35a
7 files changed
+175 -112

No files matched your search

+1 -1
View File
@@ -18,7 +18,7 @@ export default function gestureInit(art, events) {
}
});
events.proxy(document, 'touchmove', (event) => {
events.proxy($video, 'touchmove', (event) => {
if (event.touches.length === 1 && isDroging) {
const widthDiff = event.touches[0].clientX - startX;
const proportion = clamp(widthDiff / $video.clientWidth, -1, 1);