Commit c7358b4b authored by Rob Stupay's avatar Rob Stupay

update for testing

parent be3ea207
This diff is collapsed.
...@@ -8,19 +8,15 @@ const styles = styleguide.chooser() ...@@ -8,19 +8,15 @@ const styles = styleguide.chooser()
const EventManager = remixLib.EventManager const EventManager = remixLib.EventManager
class PluginManagerApi { class PluginManagerApi {
constructor (swapPanelComponent) { constructor (swapPanelComponent, pluginManagerComponent, appManager) {
this.component = swapPanelComponent this.component = swapPanelComponent
} this.appManager = appManager
appManager.event.register('pluginLoaded', (item) => {
/* pluginManagerComponent.addItem(item)
viewTitle: string })
content: DOM element pluginManagerComponent.event.on('activation', (item) => this.event.emit('activation', item))
*/ pluginManagerComponent.event.on('deactivation', (item) => this.event.emit('deactivation', item))
addView(viewTitle, content) {
// add the DOM to the swappanel
this.component.addView(viewTitle, contents)
} }
} }
module.exports = SwapPanelApi module.exports = SwapPanelApi
...@@ -8,11 +8,7 @@ const styles = styleguide.chooser() ...@@ -8,11 +8,7 @@ const styles = styleguide.chooser()
const EventManager = remixLib.EventManager const EventManager = remixLib.EventManager
class PluginManagerComponent { class PluginManagerComponent {
constructor (appManager) { constructor () {
this.appManager = appManager
appManager.event.register('pluginLoaded', () => {
// call this.renderItem
})
} }
render () { render () {
...@@ -24,6 +20,11 @@ class PluginManagerComponent { ...@@ -24,6 +20,11 @@ class PluginManagerComponent {
` `
} }
addItem (item) {
// add to appManager and then render
renderItem(item)
}
_activate(item) { _activate(item) {
this.event.emit('activation', item) this.event.emit('activation', item)
} }
...@@ -32,10 +33,6 @@ class PluginManagerComponent { ...@@ -32,10 +33,6 @@ class PluginManagerComponent {
this.event.emit('deactivation', item) this.event.emit('deactivation', item)
} }
_addPlugin(url){
this.event.emit('plugin loading', url)
}
renderItem (item) { renderItem (item) {
var self = this var self = this
...@@ -46,7 +43,6 @@ class PluginManagerComponent { ...@@ -46,7 +43,6 @@ class PluginManagerComponent {
<button onclick=${() => { self._activate(item) }} ><button> <button onclick=${() => { self._activate(item) }} ><button>
<button onclick=${() => { self._deactivate(item) }} ><button> <button onclick=${() => { self._deactivate(item) }} ><button>
</div> </div>
<button onclick=${} ><button>
` `
} }
} }
......
...@@ -8,7 +8,8 @@ const styles = styleguide.chooser() ...@@ -8,7 +8,8 @@ const styles = styleguide.chooser()
// API // API
class VerticalIconsApi { class VerticalIconsApi {
constructor(verticalIconsComponent) { constructor(verticalIconsComponent, pluginManagerApi) {
pluginManagerApi.event.on('activate', (module) => verticalIconsComponent.addIcon(module) )
this.component = verticalIconsComponent this.component = verticalIconsComponent
} }
......
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