diff --git a/lib/ice-coder.js b/lib/ice-coder.js index b37c4f0..e9c153a 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -542,13 +542,19 @@ var ICEcoder = { } // Update the list of functions and classes top.ICEcoder.updateFunctionClassList(); - // Update the minimap nav after 1 sec of inactivity + // Update the minimap nav if ("undefined" != typeof top.doMiniNav) { clearTimeout(top.doMiniNav); } - top.doMiniNav = setTimeout(function() { + if (top.ICEcoder.loadingFile) { + // Load event means set it straight away top.ICEcoder.setMinimap(); - },top.ICEcoder.loadingFile ? 0 : 1000); + } else { + // Update event means do it after 1 sec of inactivity + top.doMiniNav = setTimeout(function() { + top.ICEcoder.setMinimap(); + },1000); + } filepath = top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1]; if (filepath) { filename = filepath.substr(filepath.lastIndexOf("/")+1);