Commit 46c88da0 authored by LianaHus's avatar LianaHus

remove manual resiing of panels

parent 081dc27b
...@@ -141,7 +141,7 @@ class App { ...@@ -141,7 +141,7 @@ class App {
init () { init () {
var self = this 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) run.apply(self)
} }
......
...@@ -99,20 +99,10 @@ export default class PanelsResize { ...@@ -99,20 +99,10 @@ export default class PanelsResize {
} }
minimize () { minimize () {
let panel1Width = 0 this.panel1.style.display = 'none'
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'
} }
maximise () { maximise () {
let panel1Width = this.opt.minWidth this.panel1.style.display = 'flex'
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'
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment