From 7eb8e5886d6311879574613b09b26fd7d09b3a8d Mon Sep 17 00:00:00 2001 From: Stanislav Fifik Date: Thu, 20 Jun 2019 15:57:24 +0200 Subject: [PATCH] :sparkles: disable propagates with and height too --- src/nodes/Disable.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/nodes/Disable.js b/src/nodes/Disable.js index d7d7ce7..10b43c7 100644 --- a/src/nodes/Disable.js +++ b/src/nodes/Disable.js @@ -14,12 +14,24 @@ export default class Disable extends Node { image: { type: 'Image', }, + width: { + type: 'Number', + }, + height: { + type: 'Number', + }, }, {}); } async _update() { if (!this.in.disabled.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; + } } }