ux/FlipCounter.js
authorAlan Knowles <alan@roojs.com>
Tue, 13 Dec 2016 08:19:27 +0000 (16:19 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 13 Dec 2016 08:19:27 +0000 (16:19 +0800)
ux/FlipCounter.js

index feb0e33..a5da789 100644 (file)
@@ -35,6 +35,7 @@ Roo.extend(Roo.ux.FlipCounter, Roo.bootstrap.Component, {
     
     speed : 0.2,
     startnumber : 0,
+    currentNumber : 0,
     
     digits : false, // array...
     ulWidth : 0,
@@ -57,6 +58,7 @@ Roo.extend(Roo.ux.FlipCounter, Roo.bootstrap.Component, {
         {
             this.addDigit(startNum[i]);
         }
+        this.currentNumber = this.startnumber;
     },
     
     addDigit : function (num)
@@ -67,8 +69,7 @@ Roo.extend(Roo.ux.FlipCounter, Roo.bootstrap.Component, {
             this.addSeparator();
         }
         
-         
-        
+          
         
         var digit = new Roo.ux.FlipCounter.Digit({ manager : this, currentNumber : num });
         digit.manager = this;
@@ -117,6 +118,7 @@ Roo.extend(Roo.ux.FlipCounter, Roo.bootstrap.Component, {
     {
         var numStr = parseInt(num).toString();
         
+        this.currentNumber = num;
         // Change the number of digits displayed if needed
         if (numStr.length != this.digits.length)
         {