From 93e6d662dfc953cebdbdd11dcc886d9441054c10 Mon Sep 17 00:00:00 2001 From: BigEd Date: Fri, 5 Nov 2010 18:25:51 +0000 Subject: [PATCH] panes resize when chip graphics are shown/hidden --- expertWires.js | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/expertWires.js b/expertWires.js index c63bced..1a9ae80 100644 --- a/expertWires.js +++ b/expertWires.js @@ -317,24 +317,29 @@ var chipsurround; function updateChipLayoutVisibility(isOn){ chipLayoutIsVisible=isOn; if(chipLayoutIsVisible) { + updateChipLayoutAnimation(true); + // resize the two panes appropriately + $("#frame").trigger("resize", [ 810 ]); + $("#rightcolumn").trigger("resize", [ 738 - 180 ]); + // replace the Show Chip button with the chip graphics chipsurround=document.getElementById('chipsurround'); chipsurround.style.display = 'block'; if(expertMode) document.getElementById('layoutControlPanel').style.display = 'block'; document.getElementById('nochip').style.display = 'none'; - //document.getElementById('logstreamscroller').style.height="260px"; - updateChipLayoutAnimation(true); - setStatus('loading graphics...'); // allow the browser to respond while we load the graphics + setStatus('loading graphics...'); setTimeout(setupChipLayoutGraphics, 0); } else { // cannot animate the layout if there is no canvas updateChipLayoutAnimation(false); + // resize the two panes appropriately + $("#frame").trigger("resize", [ 120 ]); + $("#rightcolumn").trigger("resize", [ 200 ]); // replace the layout display with a button to show it document.getElementById('chipsurround').style.display = 'none'; document.getElementById('layoutControlPanel').style.display = 'none'; document.getElementById('nochip').style.display = 'block'; - //document.getElementById('logstreamscroller').style.height="880px"; } }