From 606256c6d207beb2468c80897f3280d235f2d7dd Mon Sep 17 00:00:00 2001 From: CPPAlien Date: Mon, 2 Dec 2019 12:04:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=B4=E9=9C=B2=20viewUpdate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- painter.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/painter.js b/painter.js index 7763934..f41b1bf 100644 --- a/painter.js +++ b/painter.js @@ -299,9 +299,15 @@ Component({ const pen = new Pen(this.globalContext, draw); if (isMoving && doView.type === 'text') { - pen.paint(callback, true, this.movingCache); + pen.paint((callbackInfo) => { + callback && callback(callbackInfo); + this.triggerEvent('viewUpdate', this.touchedView); + }, true, this.movingCache); } else { - pen.paint(callback) + pen.paint((callbackInfo) => { + callback && callback(callbackInfo); + this.triggerEvent('viewUpdate', this.touchedView); + }) } const { rect,