fix: 支持清空操作框,增加movingcache更新场景
This commit is contained in:
parent
93b0eac9be
commit
6e789867ed
21
painter.js
21
painter.js
@ -15,6 +15,7 @@ Component({
|
||||
paintCount: 0,
|
||||
currentPalette: {},
|
||||
movingCache: {},
|
||||
needClear: false,
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
@ -60,7 +61,9 @@ Component({
|
||||
type: Object,
|
||||
observer: function (newVal, oldVal) {
|
||||
if (newVal) {
|
||||
this.doAction(newVal)
|
||||
this.doAction(newVal, (callbackInfo) => {
|
||||
this.movingCache = callbackInfo
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
@ -72,7 +75,21 @@ Component({
|
||||
frontStyle: style
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
clearActionBox: {
|
||||
type: Boolean,
|
||||
observer: function (needClear) {
|
||||
if (needClear && !this.needClear) {
|
||||
if (this.frontContext) {
|
||||
this.frontContext.draw()
|
||||
this.touchedView = {};
|
||||
this.prevFindedIndex = this.findedIndex
|
||||
this.findedIndex = -1;
|
||||
}
|
||||
}
|
||||
this.needClear = needClear
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
data: {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user