From 1d691c34bed7391da8d7f6f2d381bac6d57fa897 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 13 Dec 2016 16:19:27 +0800 Subject: [PATCH] ux/FlipCounter.js --- ux/FlipCounter.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ux/FlipCounter.js b/ux/FlipCounter.js index feb0e3365b..a5da78986e 100644 --- a/ux/FlipCounter.js +++ b/ux/FlipCounter.js @@ -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) { -- 2.39.2