Merge pull request #12 from ethereum/serapathMaster

add init function to righthandpanel && 	use appendChild instead of replaceWith && righthandpanel.init()
pull/1/head
Alexander Praetorius 8 years ago committed by GitHub
commit fd2bf3ad51
  1. 3
      src/app.js
  2. 5
      src/app/righthand-panel.js

@ -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())
}
}
}

Loading…
Cancel
Save