✨ disable propagates with and height too
This commit is contained in:
@@ -14,12 +14,24 @@ export default class Disable extends Node {
|
|||||||
image: {
|
image: {
|
||||||
type: 'Image',
|
type: 'Image',
|
||||||
},
|
},
|
||||||
|
width: {
|
||||||
|
type: 'Number',
|
||||||
|
},
|
||||||
|
height: {
|
||||||
|
type: 'Number',
|
||||||
|
},
|
||||||
}, {});
|
}, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
async _update() {
|
async _update() {
|
||||||
if (!this.in.disabled.value) {
|
if (!this.in.disabled.value) {
|
||||||
this.out.image.value = this.in.image.value;
|
this.out.image.value = this.in.image.value;
|
||||||
|
if (this.out.width.value !== this.out.image.value.width) {
|
||||||
|
this.out.width.value = this.out.image.value.width;
|
||||||
|
}
|
||||||
|
if (this.out.height.value !== this.out.image.value.height) {
|
||||||
|
this.out.height.value = this.out.image.value.height;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user