Commit d5e51066 authored by Marc Duez's avatar Marc Duez
Browse files

model.js : use formatSize()

parent a992a622
......@@ -732,26 +732,7 @@ Model.prototype = {
* */
getStrSize : function(cloneID){
var size = this.getSize(cloneID);
var result;
if (size==0){
result="-∕-";
}else{
switch (this.notation_type){
case "percent" :
if (size<0.0001){
result=(100*size).toFixed(4)+"%";
}else if (size > 0.1){
result=(100*size).toFixed(2)+"%";
}else{
result=(100*size).toFixed(3)+"%";
}
break;
case "scientific" :
result=(size).toExponential(1);
break;
}
}
return result
return this.formatSize(size, true)
},
/* return the clone color
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment