Commit d8ac9db2 authored by serapath's avatar serapath Committed by yann300

rhp: refactor to class

parent ac90207d
...@@ -17,8 +17,8 @@ const RunTab = require('../tabs/run-tab') ...@@ -17,8 +17,8 @@ const RunTab = require('../tabs/run-tab')
const EventManager = remixLib.EventManager const EventManager = remixLib.EventManager
const styles = styleguide.chooser() const styles = styleguide.chooser()
var prototype = { module.exports = class RighthandPanel {
constructor: function RighthandPanel (api = {}, events = {}, opts = {}) { constructor (api = {}, events = {}, opts = {}) {
const self = this const self = this
self._api = api self._api = api
self._events = events self._events = events
...@@ -81,12 +81,12 @@ var prototype = { ...@@ -81,12 +81,12 @@ var prototype = {
this._view.tabbedMenu.addTab(json.title, 'plugin', content) this._view.tabbedMenu.addTab(json.title, 'plugin', content)
self.pluginManager.register(json, content) self.pluginManager.register(json, content)
}) })
}, }
render: function () { render () {
const self = this const self = this
return self._view.element return self._view.element
}, }
init: function () { init () {
const self = this const self = this
// ;[...options.children].forEach((el) => { el.classList.add(css.options) }) // ;[...options.children].forEach((el) => { el.classList.add(css.options) })
...@@ -131,9 +131,6 @@ var prototype = { ...@@ -131,9 +131,6 @@ var prototype = {
} }
} }
} }
prototype.constructor.prototype = prototype
module.exports = prototype.constructor
const css = csjs` const css = csjs`
#righthand-panel { #righthand-panel {
......
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