fix: used时禁止dancepalette与action
This commit is contained in:
parent
1a6a08395c
commit
c26ff78fe5
10
painter.js
10
painter.js
@ -46,7 +46,7 @@ Component({
|
|||||||
dancePalette: {
|
dancePalette: {
|
||||||
type: Object,
|
type: Object,
|
||||||
observer: function (newVal, oldVal) {
|
observer: function (newVal, oldVal) {
|
||||||
if (!this.isEmpty(newVal)) {
|
if (!this.isEmpty(newVal) && !this.properties.use2D) {
|
||||||
this.initDancePalette(newVal);
|
this.initDancePalette(newVal);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -72,7 +72,7 @@ Component({
|
|||||||
action: {
|
action: {
|
||||||
type: Object,
|
type: Object,
|
||||||
observer: function (newVal, oldVal) {
|
observer: function (newVal, oldVal) {
|
||||||
if (newVal && !this.isEmpty(newVal)) {
|
if (newVal && !this.isEmpty(newVal) && !this.properties.use2D) {
|
||||||
this.doAction(newVal, (callbackInfo) => {
|
this.doAction(newVal, (callbackInfo) => {
|
||||||
this.movingCache = callbackInfo
|
this.movingCache = callbackInfo
|
||||||
}, false, true)
|
}, false, true)
|
||||||
@ -232,6 +232,9 @@ Component({
|
|||||||
},
|
},
|
||||||
|
|
||||||
doAction(action, callback, isMoving, overwrite) {
|
doAction(action, callback, isMoving, overwrite) {
|
||||||
|
if (this.properties.use2D) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let newVal = null
|
let newVal = null
|
||||||
if (action) {
|
if (action) {
|
||||||
newVal = action.view
|
newVal = action.view
|
||||||
@ -622,6 +625,9 @@ Component({
|
|||||||
},
|
},
|
||||||
|
|
||||||
initDancePalette() {
|
initDancePalette() {
|
||||||
|
if (this.properties.use2D) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
this.isDisabled = true;
|
this.isDisabled = true;
|
||||||
this.initScreenK();
|
this.initScreenK();
|
||||||
this.downloadImages(this.properties.dancePalette).then(async (palette) => {
|
this.downloadImages(this.properties.dancePalette).then(async (palette) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user