Skip to content

Commit 8cb6de9

Browse files
committed
Atoms - Slicer - Allow minimap selection drag on mobile
1 parent 0a758a5 commit 8cb6de9

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/atoms/Slicer.vue

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -359,21 +359,15 @@ function handleDragging(event) {
359359
};
360360
361361
function handleTouchDragging(event) {
362-
if (event.target.classList.contains('range-handle')) {
362+
if (!zoomWrapper.value.contains(event.target)) {
363+
// Allow scrolling
363364
return;
364365
}
365366
366-
const touch = event.targetTouches[0];
367-
const deltaY = Math.abs(touch.clientY - initialMouseX.value);
368-
369-
if (deltaY > dragThreshold.value) {
370-
// Allow vertical scroll
367+
if (event.target.classList.contains('range-handle')) {
371368
return;
372369
}
373-
374-
if (event.cancelable) {
375-
event.preventDefault();
376-
}
370+
event.preventDefault();
377371
updateDragging(event.targetTouches[0].clientX);
378372
};
379373

0 commit comments

Comments
 (0)