New var to determin if ICEcoder is ready

False to start, true on init
Only consider resizing file manager width if it's true
This commit is contained in:
Matt Pass
2012-07-11 13:34:06 +01:00
parent 176c8fc557
commit 7429ec9576

View File

@@ -24,6 +24,7 @@ var ICEcoder = {
stickyTabWindow: false, // Target variable for the sticky tab window
pluginIntervalRefs: [], // Array of plugin interval refs
dragSrcEl: null, // Tab element being dragged
ready: false, // Indicates if ICEcoder is ready for action
// Don't consider these tags as part of nesting as they're singles, JS, PHP or Ruby code blocks
tagNestExceptions: ["!DOCTYPE","meta","link","img","br","hr","input","script","?php","?","%"],
@@ -63,6 +64,7 @@ var ICEcoder = {
tab.addEventListener('drop', ICEcoder.handleDrop, false);
tab.addEventListener('dragend', ICEcoder.handleDragEnd, false);
});
top.ICEcoder.ready = true;
},
// Set our layout according to the browser size
@@ -1155,13 +1157,15 @@ var ICEcoder = {
dragCursorTest: function() {
var winH;
window.innerWidth ? winH = window.innerHeight : winH = document.body.clientHeight;
if (!top.ICEcoder.mouseDown) {top.ICEcoder.draggingFilesW = false};
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";
} else {
top.document.body.style.cursor = top.ICEcoder.content.contentWindow.document.body.style.cursor = top.ICEcoder.filesFrame.contentWindow.document.body.style.cursor = "auto";
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";
} else {
top.document.body.style.cursor = top.ICEcoder.content.contentWindow.document.body.style.cursor = top.ICEcoder.filesFrame.contentWindow.document.body.style.cursor = "auto";
}
}
},