From d62c4907f3b29fd0a7142ae15de2d6dd2b1dba52 Mon Sep 17 00:00:00 2001 From: kmkzt Date: Fri, 31 May 2019 13:12:41 +0900 Subject: [PATCH] fix: fix touchPoint --- src/SvgDrawing.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SvgDrawing.ts b/src/SvgDrawing.ts index f58c524d6..8dc6610eb 100644 --- a/src/SvgDrawing.ts +++ b/src/SvgDrawing.ts @@ -168,7 +168,7 @@ export class SvgDrawing extends Two { private touchStart(e: TouchEvent) { e.preventDefault() const touch = e.touches[0] - this.drawingStart({ x: touch.pageX, y: touch.pageY }) + this.drawingStart({ x: touch.clientX, y: touch.clientY }) this.el.addEventListener( 'touchmove', this.touchMove, @@ -184,8 +184,8 @@ export class SvgDrawing extends Two { e.preventDefault() const touch = e.touches[0] this.drawingMove({ - x: touch.pageX, - y: touch.pageY + x: touch.clientX, + y: touch.clientY }) } private touchEnd(e: TouchEvent) {