Commit 47ae8fa8 authored by yann300's avatar yann300

add init function to righthandpanel

parent 9ede4ece
...@@ -60,8 +60,8 @@ function RighthandPanel (appAPI, events, opts) { ...@@ -60,8 +60,8 @@ function RighthandPanel (appAPI, events, opts) {
self.render = function () { return element } self.render = function () { return element }
self.init = function () {
;[...options.children].forEach((el) => { el.classList.add(css.options) }) ;[...options.children].forEach((el) => { el.classList.add(css.options) })
// ----------------- toggle right hand panel ----------------- // ----------------- toggle right hand panel -----------------
var hidingRHP = false var hidingRHP = false
...@@ -121,10 +121,9 @@ function RighthandPanel (appAPI, events, opts) { ...@@ -121,10 +121,9 @@ function RighthandPanel (appAPI, events, opts) {
}) })
if (appAPI.config.exists(EDITOR_WINDOW_SIZE)) { if (appAPI.config.exists(EDITOR_WINDOW_SIZE)) {
setTimeout(function () {
self._api.setEditorSize(appAPI.config.get(EDITOR_WINDOW_SIZE)) self._api.setEditorSize(appAPI.config.get(EDITOR_WINDOW_SIZE))
}, 0)
} else { } else {
appAPI.config.set(EDITOR_WINDOW_SIZE, getEditorSize()) appAPI.config.set(EDITOR_WINDOW_SIZE, getEditorSize())
} }
}
} }
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