Bladeren bron

Fix animation limit value

sebavan 6 jaren geleden
bovenliggende
commit
b4af8ba5c9
1 gewijzigde bestanden met toevoegingen van 4 en 1 verwijderingen
  1. 4 1
      src/Animations/runtimeAnimation.ts

+ 4 - 1
src/Animations/runtimeAnimation.ts

@@ -455,9 +455,12 @@ export class RuntimeAnimation {
         this._previousDelay = delay;
         this._previousRatio = ratio;
 
-        if (((to > from && ratio >= range) || (from > to && ratio <= range)) && !loop) { // If we are out of range and not looping get back to caller
+        if ((to > from && ratio >= range) && !loop) { // If we are out of range and not looping get back to caller
             returnValue = false;
             highLimitValue = this._animation._getKeyValue(keys[keys.length - 1].value);
+        } else if ((from > to && ratio <= range) && !loop) {
+            returnValue = false;
+            highLimitValue = this._animation._getKeyValue(keys[0].value);
         } else {
             // Get max value if required