diff --git a/client/jsFiles/SEAWebClientGraphics.js b/client/jsFiles/SEAWebClientGraphics.js index 6f45c18..d5d851d 100644 --- a/client/jsFiles/SEAWebClientGraphics.js +++ b/client/jsFiles/SEAWebClientGraphics.js @@ -328,25 +328,19 @@ let graphs = (function (){ */ function createSelection(gindex){ let graph_elm = graph_elm_array[gindex]; - console.log("clear for createSelection", gindex) clear(gindex); + for(let tag in tag_dict){ + if (tag_dict[tag] === gindex){ // we indicate that the tag is not displayed + tag_dict[tag] = -1 + break + } + } let selection = document.createElement('div'); selection.classList.add('selection'); - delete prev_blk[gindex]; - console.log('cresel', gindex, prev_blk, tag_dict); - let creidx = null; - let creblock = null; - for (let i in prev_blk) { - creblock = prev_blk[i]; - if (tag_dict[creblock.tag] == gindex) { - creidx = i; - break; - } - } for (let block of blocks) { - console.log('ck', block.tag, tag_dict[block.tag], creidx) + let bel = document.createElement('div'); bel.classList.add('select'); let title = document.createElement('div'); @@ -363,21 +357,18 @@ let graphs = (function (){ } bel.appendChild(params); bel.addEventListener('click', function(){ - if (block.tag in tag_dict) { - let idx = tag_dict[block.tag]; - createSelection(idx); - prev_blk[idx] = block; - } - createGraph(gindex, block); + if (block.tag in tag_dict) { //if the block that we might select is in the ones that are displayed + let idx = tag_dict[block.tag]; // we get the current gindex (idx) of the clicked block + if(idx != -1){ //if the clicked block is displayed somewhere, we create a selection window + createSelection(idx); // We will create a selection at the gindex + } + } + createGraph(gindex, block); // we create at the current shown selector (gindex), the graph corresponding to the one clicked (block) }) selection.appendChild(bel); } graph_elm.appendChild(selection); - if (creidx !== null) { - console.log('creblock', creidx, creblock); - createGraph(creidx, creblock); - } } /** diff --git a/client/jsFiles/SEAWebClientMain.js b/client/jsFiles/SEAWebClientMain.js index 77b7b4c..cc55908 100644 --- a/client/jsFiles/SEAWebClientMain.js +++ b/client/jsFiles/SEAWebClientMain.js @@ -76,6 +76,7 @@ new Settings() .treat("showConsole", "sc", to_bool, true) .treat("showOverview", "so", to_bool, true) .treat("showGraphics", "sg", to_bool, true) // false) + .treat("hideRightPart", "hr", to_bool, false) .treat("showAsync", "sa", to_bool, false) function loadFirstBlocks() { diff --git a/client/jsFiles/SEAWebClientResponsivity.js b/client/jsFiles/SEAWebClientResponsivity.js index eeed0d1..1a3018d 100644 --- a/client/jsFiles/SEAWebClientResponsivity.js +++ b/client/jsFiles/SEAWebClientResponsivity.js @@ -67,6 +67,14 @@ function adjustGrid() { paramSlider = [0,1,2,3]; prevActiveSlider = 0; + if (window["hideRightPart"]){ + style(0,"100vw","100vh"); + style(1); // hide + style(2); // hide + style(3); // hide + return + } + switch (nColumns) { case 1: if (menuMode) {