暴露 viewUpdate

This commit is contained in:
CPPAlien 2019-12-02 12:04:52 +08:00
parent 6baedf5ba1
commit 606256c6d2

View File

@ -299,9 +299,15 @@ Component({
const pen = new Pen(this.globalContext, draw); const pen = new Pen(this.globalContext, draw);
if (isMoving && doView.type === 'text') { 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 { } else {
pen.paint(callback) pen.paint((callbackInfo) => {
callback && callback(callbackInfo);
this.triggerEvent('viewUpdate', this.touchedView);
})
} }
const { const {
rect, rect,