Commit fd2bf3ad authored by Alexander Praetorius's avatar Alexander Praetorius Committed by GitHub

Merge pull request #12 from ethereum/serapathMaster

add init function to righthandpanel && use appendChild instead of replaceWith && righthandpanel.init()
parents 9ede4ece 6650076c
......@@ -708,7 +708,8 @@ function run () {
udapp: udapp.event
}
var righthandPanel = new RighthandPanel(rhpAPI, rhpEvents, {}) // eslint-disable-line
self._view.rightpanel.replaceWith(righthandPanel.render())
self._view.rightpanel.appendChild(righthandPanel.render())
righthandPanel.init()
// ----------------- editor resize ---------------
......
......@@ -60,8 +60,8 @@ function RighthandPanel (appAPI, events, opts) {
self.render = function () { return element }
self.init = function () {
;[...options.children].forEach((el) => { el.classList.add(css.options) })
// ----------------- toggle right hand panel -----------------
var hidingRHP = false
......@@ -121,10 +121,9 @@ function RighthandPanel (appAPI, events, opts) {
})
if (appAPI.config.exists(EDITOR_WINDOW_SIZE)) {
setTimeout(function () {
self._api.setEditorSize(appAPI.config.get(EDITOR_WINDOW_SIZE))
}, 0)
} else {
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