var startNum = (1.0*this.startnumber).toFixed(this.decimal);
- Roo.log("STARTNUmber: " + startNum);
+ //Roo.log("STARTNUmber: " + startNum);
for (i=startNum.length-1; i>=0; i=i-1)
{
addDigit : function (num)
{
- Roo.log("Add digit "+ num);
+ //Roo.log("Add digit "+ num);
// Add separator after every 3rd digit
- /*if (this.digits.length % 3 == 0 && this.digits.length != 0)
- {
+ if (this.decimal == 0 && this.digits.length % 3 == 0 && this.digits.length != 0) {
this.addSeparator(',');
}
- */
+
var digit = new Roo.ux.FlipCounter.Digit({ manager : this, currentNumber : num });
digit.el.remove();
// Remove separators
- // if (this.digits.length % 3 == 0)
- // {
- // var comma = this.el.select('li.comma:first-child');
- // this.ulWidth = this.ulWidth - comma.getWidth(true);
- // comma.remove();
- //}
+ if (this.decimal == 0 & this.digits.length % 3 == 0)
+ {
+ var comma = this.el.select('li.comma:first-child');
+ this.ulWidth = this.ulWidth - comma.getWidth(true);
+ comma.remove();
+ }
// Update width to current
this.el.set( { 'min-width' : this.ulWidth});
if (numStr.length != dl)
{
var diff = numStr.length - dl;
- Roo.log("DIFF LEN=" +diff);
+ //Roo.log("DIFF LEN=" +diff);
if (diff > 0)
{
for (i=0; i<diff; i=i+1) {
if (numStr[numStr.length - 1 - i] == '.') {
continue;
}
- Roo.log("UPDATE DIGIT=" + i + " to " + numStr[numStr.length - 1 - i]);
+ //Roo.log("UPDATE DIGIT=" + i + " to " + numStr[numStr.length - 1 - i]);
this.digits[n++].flipTo(numStr[numStr.length - 1 - i]);
}
}
getAutoCreate : function(){
- Roo.log("render with cn=" + this.currentNumber);
+ //Roo.log("render with cn=" + this.currentNumber);
return {
tag: 'li',
cn : [