From 350d10d98b7336e2ae4f75301e9666769e82842a Mon Sep 17 00:00:00 2001 From: Matt C Date: Fri, 11 May 2018 10:03:06 +0100 Subject: [PATCH] Added toggleString support --- src/core/Ingredient.mjs | 2 ++ src/core/Operation.mjs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/Ingredient.mjs b/src/core/Ingredient.mjs index 18823daf..914500f3 100755 --- a/src/core/Ingredient.mjs +++ b/src/core/Ingredient.mjs @@ -21,6 +21,7 @@ class Ingredient { this.name = ""; this.type = ""; this._value = null; + this.toggleValues = []; if (ingredientConfig) { this._parseConfig(ingredientConfig); @@ -38,6 +39,7 @@ class Ingredient { this.name = ingredientConfig.name; this.type = ingredientConfig.type; this.defaultValue = ingredientConfig.value; + this.toggleValues = ingredientConfig.toggleValues; } diff --git a/src/core/Operation.mjs b/src/core/Operation.mjs index e87c31f4..e0b587c6 100755 --- a/src/core/Operation.mjs +++ b/src/core/Operation.mjs @@ -172,7 +172,8 @@ class Operation { return { name: ing.name, type: ing.type, - value: ing.defaultValue + value: ing.defaultValue, + toggleValues: ing.toggleValues || [] }; }); }