show minimum of 0.1KB for small files in file editor
This commit is contained in:
@@ -264,7 +264,7 @@ function createTree(element, editor){
|
||||
leaf.textContent=name;
|
||||
var span = cE("span");
|
||||
span.style.cssText = "font-size: 14px; color: #aaa; margin-left: 8px;";
|
||||
span.textContent = (size / 1024).toFixed(1) + "KB";
|
||||
span.textContent = Math.max(0.1, (size / 1024)).toFixed(1) + "KB"; // show size in KB, minimum 0.1 to not show 0KB for small files
|
||||
leaf.appendChild(span);
|
||||
leaf.onmouseover=function(){ leaf.style.background="#333"; };
|
||||
leaf.onmouseout=function(){ leaf.style.background=""; };
|
||||
|
||||
Reference in New Issue
Block a user