Skip to content

Commit 95b7d0d

Browse files
committed
Immediate invoking or on interval instead
1 parent abcedf9 commit 95b7d0d

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

lib/ice-coder.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,13 +542,19 @@ var ICEcoder = {
542542
}
543543
// Update the list of functions and classes
544544
top.ICEcoder.updateFunctionClassList();
545-
// Update the minimap nav after 1 sec of inactivity
545+
// Update the minimap nav
546546
if ("undefined" != typeof top.doMiniNav) {
547547
clearTimeout(top.doMiniNav);
548548
}
549-
top.doMiniNav = setTimeout(function() {
549+
if (top.ICEcoder.loadingFile) {
550+
// Load event means set it straight away
550551
top.ICEcoder.setMinimap();
551-
},top.ICEcoder.loadingFile ? 0 : 1000);
552+
} else {
553+
// Update event means do it after 1 sec of inactivity
554+
top.doMiniNav = setTimeout(function() {
555+
top.ICEcoder.setMinimap();
556+
},1000);
557+
}
552558
filepath = top.ICEcoder.openFiles[top.ICEcoder.selectedTab-1];
553559
if (filepath) {
554560
filename = filepath.substr(filepath.lastIndexOf("/")+1);

0 commit comments

Comments
 (0)