Merge pull request #200 from Kujiale-Mobile/heidao

fix: 支持清空操作框,增加movingcache更新场景
This commit is contained in:
Chris 2019-11-29 14:11:55 +08:00 committed by GitHub
commit 6cf8c577f2

View File

@ -15,6 +15,7 @@ Component({
paintCount: 0, paintCount: 0,
currentPalette: {}, currentPalette: {},
movingCache: {}, movingCache: {},
needClear: false,
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
@ -65,7 +66,9 @@ Component({
type: Object, type: Object,
observer: function (newVal, oldVal) { observer: function (newVal, oldVal) {
if (newVal) { if (newVal) {
this.doAction(newVal) this.doAction(newVal, (callbackInfo) => {
this.movingCache = callbackInfo
})
} }
}, },
}, },
@ -77,7 +80,21 @@ Component({
frontStyle: style 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: { data: {