diff --git a/src/js/rulesAssistant.js b/src/js/rulesAssistant.js index c4857c8310a09f4507919e2c189d1d7cadbe1000..715c033e8ebd1e3808a9d771c84c9470d2af0062 100644 --- a/src/js/rulesAssistant.js +++ b/src/js/rulesAssistant.js @@ -547,7 +547,7 @@ App.RA.makeRange = function(minValue, maxValue) { * @returns {boolean} */ App.RA.shallGrow = function(current, target, step = 1) { - return target && (((current < target.val - step) && (target.cond === '==')) || + return target && (((current + step <= target.val) && (target.cond === '==')) || ((current < target.val) && (target.cond === '>=' || target.cond === '>')) || (current === target.val && target.cond === '>')); }; @@ -560,7 +560,7 @@ App.RA.shallGrow = function(current, target, step = 1) { * @returns {boolean} */ App.RA.shallShrink = function(current, target, step = 1) { - return target && (((current > target.val + step) && (target.cond === '==')) || + return target && (((current - step >= target.val) && (target.cond === '==')) || ((current > target.val) && (target.cond === '<=' || target.cond === '<')) || (current === target.val && target.cond === '<')); };