X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2FUI.git;a=blobdiff_plain;f=skyquake%2Fplugins%2Fcomposer%2Fsrc%2Fsrc%2Fstores%2FComposerAppStore.js;h=b30193ad86327b0211bf94af63f020c580319bc6;hp=3671890b5a060d285eb74841badc22ecb7386c26;hb=266adb435d7a60ae758efb28614c80d24c05fbba;hpb=d3b3a1c5d521361bfa40dbdec779495eb2bfd8a0 diff --git a/skyquake/plugins/composer/src/src/stores/ComposerAppStore.js b/skyquake/plugins/composer/src/src/stores/ComposerAppStore.js index 3671890b5..b30193ad8 100644 --- a/skyquake/plugins/composer/src/src/stores/ComposerAppStore.js +++ b/skyquake/plugins/composer/src/src/stores/ComposerAppStore.js @@ -341,13 +341,21 @@ class ComposerAppStore { this.setState({showJSONViewer: false}); } - toggleCanvasPanelTray() { + toggleCanvasPanelTray(event) { const layout = this.layout; - if (layout.bottom > 25) { + const attrMap = event.target.attributes; + let panelEvent = null; + for(let k in attrMap) { + if(attrMap[k].name == 'data-event') { + panelEvent = attrMap[k].nodeValue; + } + } + if ((layout.bottom > 25) && ((panelEvent == this.displayedPanel) || panelEvent == 'arrow')) { this.closeCanvasPanelTray(); } else { this.openCanvasPanelTray(); } + this.setState({displayedPanel: panelEvent}) } openCanvasPanelTray() {