Browse Source

Added toggleString support

Matt C 7 years ago
parent
commit
350d10d98b
2 changed files with 4 additions and 1 deletions
  1. 2 0
      src/core/Ingredient.mjs
  2. 2 1
      src/core/Operation.mjs

+ 2 - 0
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;
     }
 
 

+ 2 - 1
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 || []
             };
         });
     }