From d4e5a2a52944a66fdaf6cc33707642f8b748a058 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Wed, 7 Jun 2023 11:55:31 +0200 Subject: [PATCH] Fixed visual glitch with filling 1 space slot with 0 cost filler --- .../ui/creature/buildTree/BuildTreeNode.vue | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/app/imports/client/ui/creature/buildTree/BuildTreeNode.vue b/app/imports/client/ui/creature/buildTree/BuildTreeNode.vue index 26629374..0e037ae9 100644 --- a/app/imports/client/ui/creature/buildTree/BuildTreeNode.vue +++ b/app/imports/client/ui/creature/buildTree/BuildTreeNode.vue @@ -43,7 +43,7 @@ {{ node.name }} @@ -175,7 +175,8 @@ export default { this.children.length === 1 && this.children[0].node.type !== 'propertySlot' && this.node.quantityExpected && - this.node.quantityExpected.value === 1; + this.node.quantityExpected.value === 1 && + !this.canFill; }, isSlot(){ return this.node.type === 'propertySlot'; @@ -185,15 +186,18 @@ export default { }, canFillWithOne(){ return this.isSlot && - this.node.quantityExpected && + this.canFill && + this.node.quantityExpected && this.node.quantityExpected.value === 1 && - this.node.spaceLeft === 1 + this.node.spaceLeft === 1 && + !this.children?.length; }, canFillWithMany(){ - return this.isSlot && ( + return this.isSlot && this.canFill && ( !this.node.quantityExpected || this.node.quantityExpected.value === 0 || - (this.node.quantityExpected.value > 1 && this.node.spaceLeft > 0) + (this.node.quantityExpected.value > 1 && this.node.spaceLeft > 0) || + (this.node.quantityExpected.value === 1 && this.children?.length) ); }, hasChildren(){