From 46c88da08c3e111791717e0b50b8489eb843e5ec Mon Sep 17 00:00:00 2001 From: LianaHus Date: Thu, 8 Aug 2019 16:06:39 +0200 Subject: [PATCH] remove manual resiing of panels --- src/app.js | 2 +- src/lib/panels-resize.js | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/app.js b/src/app.js index a77f3b7e54..a63821319b 100644 --- a/src/app.js +++ b/src/app.js @@ -141,7 +141,7 @@ class App { init () { var self = this - self._components.resizeFeature = new PanelsResize('#side-panel', '#editor-container', { 'minWidth': 300, x: 450 }) + self._components.resizeFeature = new PanelsResize('#side-panel', '#editor-container', { 'minWidth': 330, x: 450 }) run.apply(self) } diff --git a/src/lib/panels-resize.js b/src/lib/panels-resize.js index 9edd232f1d..a32006866f 100644 --- a/src/lib/panels-resize.js +++ b/src/lib/panels-resize.js @@ -99,20 +99,10 @@ export default class PanelsResize { } minimize () { - let panel1Width = 0 - let panel2left = this.panel1.offsetLeft + panel1Width - let panel2Width = this.panel2.parentElement.clientWidth - this.panel1.offsetLeft - panel1Width - this.panel1.style.width = panel1Width + 'px' - this.panel2.style.left = panel2left + 'px' - this.panel2.style.width = panel2Width + 'px' + this.panel1.style.display = 'none' } maximise () { - let panel1Width = this.opt.minWidth - let panel2left = this.panel1.offsetLeft + panel1Width - let panel2Width = this.panel2.parentElement.clientWidth - this.panel1.offsetLeft - panel1Width - this.panel1.style.width = panel1Width + 'px' - this.panel2.style.left = panel2left + 'px' - this.panel2.style.width = panel2Width + 'px' + this.panel1.style.display = 'flex' } }