Skip to content

Commit

Permalink
#307: avoid space between sign and numbers in formatDecimal
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas committed Aug 22, 2023
1 parent e750cc2 commit 3fb2b49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions viewer/util/formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const formatDecimal=function(number,fix,fract,addSpace,prefixZero){
number=-number;
sign="-";
}
let rt=number.toFixed(fract);
let rt=sign+number.toFixed(fract);
let v=10;
fix-=1;
while (fix > 0){
Expand All @@ -96,7 +96,7 @@ const formatDecimal=function(number,fix,fract,addSpace,prefixZero){
v=v*10;
fix-=1;
}
return sign+rt;
return rt;
};
formatDecimal.parameters=[
{name:'fix',type:'NUMBER'},
Expand Down

0 comments on commit 3fb2b49

Please sign in to comment.