speed : 0.2,
startnumber : 0,
+ currentNumber : 0,
+ decimal : 0,
digits : false, // array...
- ulWidth : 0,
+ ulWidth : 0,
+ cls : '',
getAutoCreate : function(){
return {
tag: 'ul',
- cls: 'flipcounter',
+ cls: 'flipcounter ' + this.cls,
};
},
{
this.addDigit(startNum[i]);
}
+ this.currentNumber = this.startnumber;
},
addDigit : function (num)
this.addSeparator();
}
-
-
+
var digit = new Roo.ux.FlipCounter.Digit({ manager : this, currentNumber : num });
digit.manager = this;
{
var digit = this.digits.splice(this.digits.length-1, 1)[0];
- this.ulWidth = this.ulWidth - digit.el.outerWidth(true);
- digit.li.remove();
+ this.ulWidth = this.ulWidth - digit.el.getWidth(true);
+ digit.el.remove();
// Remove separators
if (this.digits.length % 3 == 0)
{
var numStr = parseInt(num).toString();
+ this.currentNumber = num;
// Change the number of digits displayed if needed
if (numStr.length != this.digits.length)
{
scaleY: {from: 0, to : 1},
},
- this.manager.options.speed * 0.5, //duration
+ this.manager.speed * 0.5, //duration
function() {
digit.currentNum = digit.nextNum;
digit.topNumFront.dom.innerHTML = digit.currentNum;