init dance 期间禁掉操作

This commit is contained in:
dongqing 2019-12-05 10:20:03 +08:00
parent e14e847a67
commit 30a370cfe0

View File

@ -615,6 +615,7 @@ Component({
}, },
initDancePalette() { initDancePalette() {
this.isDisabled = true;
this.initScreenK(); this.initScreenK();
this.downloadImages(this.properties.dancePalette).then((palette) => { this.downloadImages(this.properties.dancePalette).then((palette) => {
this.currentPalette = palette this.currentPalette = palette
@ -635,6 +636,7 @@ Component({
this.topContext || (this.topContext = wx.createCanvasContext('top', this)); this.topContext || (this.topContext = wx.createCanvasContext('top', this));
this.globalContext || (this.globalContext = wx.createCanvasContext('k-canvas', this)); this.globalContext || (this.globalContext = wx.createCanvasContext('k-canvas', this));
new Pen(this.bottomContext, palette).paint(() => { new Pen(this.bottomContext, palette).paint(() => {
this.isDisabled = false;
this.triggerEvent('didShow'); this.triggerEvent('didShow');
}); });
this.globalContext.draw(); this.globalContext.draw();