hitfix for the greater than operator not being flipped
for display on a node diff subtype where node one is higher than node 2 the operators and value need to be 'flipped' since that is how the interactions are stored example: node 2 -> node 1 the user enters greater than 10 then what is sent down for the interaction is if node 2 minus node 1 is less than -10 so the display needs to flip them back to 'greater than' and +10
This commit is contained in:
parent
8d6f6517fb
commit
3a89c3b191
1 changed files with 1 additions and 1 deletions
|
|
@ -131,7 +131,7 @@ export default function DevicePage() {
|
||||||
//flip operator and send negative comparitor to save
|
//flip operator and send negative comparitor to save
|
||||||
interaction.settings.conditions.forEach(condition => {
|
interaction.settings.conditions.forEach(condition => {
|
||||||
//coming back from the backend as a string for some reason
|
//coming back from the backend as a string for some reason
|
||||||
if (condition.comparison.toString() === "RELATIONAL_OPERATOR_GREATER_THAN") {
|
if (condition.comparison === quack.RelationalOperator.RELATIONAL_OPERATOR_GREATER_THAN) {
|
||||||
condition.comparison = quack.RelationalOperator.RELATIONAL_OPERATOR_LESS_THAN;
|
condition.comparison = quack.RelationalOperator.RELATIONAL_OPERATOR_LESS_THAN;
|
||||||
} else {
|
} else {
|
||||||
condition.comparison = quack.RelationalOperator.RELATIONAL_OPERATOR_GREATER_THAN;
|
condition.comparison = quack.RelationalOperator.RELATIONAL_OPERATOR_GREATER_THAN;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue