From: Alan Knowles Date: Fri, 20 Jan 2017 04:08:10 +0000 (+0800) Subject: ux/FlipCounter.js X-Git-Url: http://git.roojs.org/?a=commitdiff_plain;h=87910ed7bebeb7db3c783bd26c90cf2081c6ef4f;hp=b63adf3d4971fff9299f6433bc15d2e06135aced;p=roojs1 ux/FlipCounter.js --- diff --git a/ux/FlipCounter.js b/ux/FlipCounter.js index 59b2c6bf64..0296373a26 100644 --- a/ux/FlipCounter.js +++ b/ux/FlipCounter.js @@ -74,11 +74,10 @@ Roo.extend(Roo.ux.FlipCounter, Roo.bootstrap.Component, { //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 }); @@ -103,12 +102,12 @@ Roo.extend(Roo.ux.FlipCounter, Roo.bootstrap.Component, { 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});