Skip to content

Commit

Permalink
fix: fix touchPoint
Browse files Browse the repository at this point in the history
  • Loading branch information
kmkzt committed May 31, 2019
1 parent 356ca10 commit d62c490
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/SvgDrawing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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) {
Expand Down

0 comments on commit d62c490

Please sign in to comment.