projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
432d72b
)
Roo/util/Format.js
author
Alan Knowles
<alan@akbkhome.com>
Mon, 25 Oct 2010 06:57:00 +0000
(14:57 +0800)
committer
Alan Knowles
<alan@akbkhome.com>
Mon, 25 Oct 2010 06:57:00 +0000
(14:57 +0800)
Roo/util/Format.js
patch
|
blob
|
history
diff --git
a/Roo/util/Format.js
b/Roo/util/Format.js
index
5e515b9
..
edcd415
100644
(file)
--- a/
Roo/util/Format.js
+++ b/
Roo/util/Format.js
@@
-128,7
+128,7
@@
Roo.util.Format = function(){
{
// why not use to fixed - precision is buggered???
if (!n) {
- return Math.round(
(
v-0);
+ return Math.round(v-0);
}
var fact = Math.pow(10,n);
v = (Math.round((v-0)*fact))/fact;
@@
-139,7
+139,11
@@
Roo.util.Format = function(){
// now just padd decimals..
var ps = String(v).split('.');
- var r = (ps[1] + z).substring(0,z.length);
+ var fd = (ps[1] + z);
+ var r = fd.substring(0,z.length);
+
+
+
return ps[0] + '.' + r;
},