Skip to content

Commit e4724e8

Browse files
committed
Separate terminal display & fix minimap layout call
1 parent f2b0227 commit e4724e8

2 files changed

Lines changed: 41 additions & 39 deletions

File tree

lib/ice-coder.js

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -264,22 +264,24 @@ var ICEcoder = {
264264
docExplorerShow: function(item) {
265265
var cM;
266266

267-
get('miniMap').style.display = item == "miniMap" ? 'block' : 'none';
268-
get('functionClassList').style.display = item == "functionClassList" ? 'block' : 'none';
269-
get('terminal').style.display = item == "terminal" ? 'block' : 'none';
270-
if (item == "miniMap") {
271-
top.miniMapInt = setInterval(function(){
272-
if (get('miniMapContent').getBoundingClientRect().height != 0) {
273-
cM = top.ICEcoder.getcMInstance();
274-
top.ICEcoder.setMinimapLayout(cM);
275-
clearInterval(top.miniMapInt);
276-
}
277-
},10);
278-
}
279267
if (item == "terminal") {
268+
get('terminal').style.display = 'block';
280269
setTimeout(function(){
281270
top.ICEcoder.terminal.contentWindow.document.getElementById('command').focus();
282271
},0);
272+
} else {
273+
get('terminal').style.display = 'none';
274+
get('miniMap').style.display = item == "miniMap" ? 'block' : 'none';
275+
get('functionClassList').style.display = item == "functionClassList" ? 'block' : 'none';
276+
if (item == "miniMap") {
277+
top.miniMapInt = setInterval(function(){
278+
if (get('miniMapContent').getBoundingClientRect().height != 0) {
279+
cM = top.ICEcoder.getcMInstance();
280+
top.ICEcoder.setMinimapLayout(cM);
281+
clearInterval(top.miniMapInt);
282+
}
283+
},10);
284+
}
283285
}
284286
},
285287

@@ -1239,7 +1241,7 @@ var ICEcoder = {
12391241
top.ICEcoder.mouseDownMinimap = false;
12401242
});
12411243

1242-
top.ICEcoder.setMinimapLayout();
1244+
top.ICEcoder.setMinimapLayout(cM);
12431245

12441246
get('docExplorer').style.right = "-220px";
12451247
}

0 commit comments

Comments
 (0)