Skip to content

Commit

Permalink
refactor analysis tab
Browse files Browse the repository at this point in the history
  • Loading branch information
serapath committed Apr 10, 2018
1 parent 1c0472f commit 0483053
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 35 deletions.
38 changes: 29 additions & 9 deletions src/app/tabs/analysis-tab.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
var yo = require('yo-yo')
var css = require('./styles/analysis-tab-styles')
var csjs = require('csjs-inject')
var remixLib = require('remix-lib')

function analysisTab (api = {}, events = {}, opts = {}) {
var el = yo`
<div class="${css.analysisTabView} "id="staticanalysisView">
</div>
`
return { render () { return el } }
}
var EventManager = remixLib.EventManager

module.exports = analysisTab
module.exports = class AnalysisTab {
constructor (opts = { api: {}, events: {} }) {
const self = this
self.event = new EventManager()
self._api = opts.api
self._events = opts.events
self._view = { el: null }
self.data = {}
self._components = {}
}
render () {
const self = this
if (self._view.el) return self._view.el
self._view.el = yo`
<div class="${css.analysisTabView} "id="staticanalysisView"></div>`
return self._view.el
}
}
const css = csjs`
.analysisTabView {
padding: 2%;
padding-bottom: 3em;
display: flex;
flex-direction: column;
}
`
26 changes: 0 additions & 26 deletions src/app/tabs/styles/analysis-tab-styles.js

This file was deleted.

0 comments on commit 0483053

Please sign in to comment.