Commit 843efc9d authored by Marc Duez's avatar Marc Duez
Browse files

model.js : clones sizes are displayed in two possible notation (scientific or percent)

parent 8c845f31
...@@ -730,20 +730,29 @@ Model.prototype = { ...@@ -730,20 +730,29 @@ Model.prototype = {
/* return the clone size with a fixed number of character /* return the clone size with a fixed number of character
* use scientific notation if neccesary * use scientific notation if neccesary
* */ * */
getStrSize : function(cloneID){ getStrSize : function(cloneID){
var size = this.getSize(cloneID); var size = this.getSize(cloneID);
var result; var result;
if (size==0){ if (size==0){
result="-∕-"; result="-∕-";
}else{ }else{
if (size<0.0001){ switch (this.notation_type){
result=(size).toExponential(1); case "percent" :
}else{ if (size<0.0001){
result=(100*size).toFixed(3)+"%"; result=(100*size).toFixed(4)+"%";
} }else if (size > 0.1){
} result=(100*size).toFixed(2)+"%";
return result }else{
}, result=(100*size).toFixed(3)+"%";
}
break;
case "scientific" :
result=(size).toExponential(1);
break;
}
}
return result
},
/* return the clone color /* 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