Skip to content

Commit e068d1e

Browse files
committed
feat(image-viewer): 优化preview
1 parent 65ffbb9 commit e068d1e

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/image-viewer/useTouchEvent.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@ export function useTouchEvent(
7474
const { touches = [] } = event;
7575
if (touches.length > 1) {
7676
// touch zoom
77-
updateTouchPointInfo({
78-
point1: { x: touches[0].clientX, y: touches[0].clientY },
79-
point2: { x: touches[1].clientX, y: touches[1].clientY },
80-
eventType: 'touchZoom',
81-
});
77+
// updateTouchPointInfo({
78+
// point1: { x: touches[0].clientX, y: touches[0].clientY },
79+
// point2: { x: touches[1].clientX, y: touches[1].clientY },
80+
// eventType: 'touchZoom',
81+
// });
8282
} else {
8383
// touch move
8484
updateTouchPointInfo({
@@ -111,11 +111,11 @@ export function useTouchEvent(
111111
const ratio = getDistance(newPoint1, newPoint2) / getDistance(point1, point2);
112112

113113
dispatchZoomChange(ratio, 'touchZoom', centerX, centerY, true);
114-
updateTouchPointInfo({
115-
point1: newPoint1,
116-
point2: newPoint2,
117-
eventType: 'touchZoom',
118-
});
114+
// updateTouchPointInfo({
115+
// point1: newPoint1,
116+
// point2: newPoint2,
117+
// eventType: 'touchZoom',
118+
// });
119119
} else if (eventType === 'move') {
120120
// touch move
121121
updateTransform(

0 commit comments

Comments
 (0)