From b4b2cbf761c65651b263ccf62ba5504551603e3a Mon Sep 17 00:00:00 2001 From: oc Date: Thu, 1 Nov 2018 21:19:43 +0800 Subject: [PATCH 1/2] touchend --- main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index f994fcd0..45ccd438 100644 --- a/main.js +++ b/main.js @@ -381,8 +381,9 @@ main.dom.data.ontouchmove = function (e) { } ////// 手指离开触摸屏时 ////// -main.dom.data.ontouchend = function () { +main.dom.data.ontouchend = function (e) { try { + e.preventDefault(); main.core.onup(); } catch (e) { } From 4ac5dd06c5f0fb6c33f328ccd94c11fbfff5d5c0 Mon Sep 17 00:00:00 2001 From: oc Date: Thu, 1 Nov 2018 21:25:56 +0800 Subject: [PATCH 2/2] paint offset --- libs/actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/actions.js b/libs/actions.js index f9199dde..d43972f8 100644 --- a/libs/actions.js +++ b/libs/actions.js @@ -308,7 +308,7 @@ actions.prototype.ondown = function (loc) { // 画板 if (core.status.played && (core.status.event||{}).id=='paint') { - this.ondownPaint(loc.x, loc.y); + this.ondownPaint(loc.x/core.domStyle.scale, loc.y/core.domStyle.scale); return; } @@ -346,7 +346,7 @@ actions.prototype.onmove = function (loc) { // 画板 if (core.status.played && (core.status.event||{}).id=='paint') { - this.onmovePaint(loc.x, loc.y) + this.onmovePaint(loc.x/core.domStyle.scale, loc.y/core.domStyle.scale) return; }