Fix to when we can show cursor & filesize shown

Now only changes cursor if both iframes are loaded
unitSize is shown in 2 decimal places now if unit type is megabytes
This commit is contained in:
Matt Pass
2012-07-13 18:10:01 +01:00
parent e4e9217d84
commit 0296379cfa

View File

@@ -1155,16 +1155,19 @@ var ICEcoder = {
// Test if we need to show a drag cursor or not
dragCursorTest: function() {
var winH;
var winH, cursorName;
if (top.ICEcoder.ready) {
window.innerWidth ? winH = window.innerHeight : winH = document.body.clientHeight;
if (!top.ICEcoder.mouseDown) {top.ICEcoder.draggingFilesW = false};
if ((top.ICEcoder.mouseX > top.ICEcoder.filesW-7 && top.ICEcoder.mouseX < top.ICEcoder.filesW+7 && top.ICEcoder.mouseY > 40 && top.ICEcoder.mouseY < (winH-30)) || top.ICEcoder.draggingFilesW) {
top.document.body.style.cursor = top.ICEcoder.content.contentWindow.document.body.style.cursor = top.ICEcoder.filesFrame.contentWindow.document.body.style.cursor = "w-resize";
cursorName = "w-resize";
} else {
top.document.body.style.cursor = top.ICEcoder.content.contentWindow.document.body.style.cursor = top.ICEcoder.filesFrame.contentWindow.document.body.style.cursor = "auto";
cursorName = "auto";
}
if (top.ICEcoder.content.contentWindow.document && top.ICEcoder.filesFrame.contentWindow) {
top.document.body.style.cursor = top.ICEcoder.content.contentWindow.document.body.style.cursor = top.ICEcoder.filesFrame.contentWindow.document.body.style.cursor = cursorName;
}
}
},
@@ -1584,7 +1587,7 @@ var ICEcoder = {
unitText = "kb";
// Maybe we should show in megabytes?
if (unitSize >= 1024) {
unitSize = unitSize / 1024;
unitSize = (unitSize / 1024).toFixed(2);
unitText = "mb";
}
// Update the display