Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Get rid of coffeescript, Try to add panel display from go-plus
Browse files Browse the repository at this point in the history
  • Loading branch information
0mkara committed Feb 23, 2017
1 parent 27fbc42 commit beeb333
Show file tree
Hide file tree
Showing 10 changed files with 2,044 additions and 1,032 deletions.
65 changes: 65 additions & 0 deletions lib/etch-component.js
@@ -0,0 +1,65 @@
/** @babel */
/** @jsx etch.dom */

import etch from 'etch'

/*
Public: Abstract class for handling the initialization
boilerplate of an Etch component.
*/
export default class EtchComponent {
constructor (props) {
this.props = props

etch.initialize(this)
EtchComponent.setScheduler(atom.views)
}

/*
Public: Gets the scheduler Etch uses for coordinating DOM updates.
Returns a {Scheduler}
*/
static getScheduler () {
return etch.getScheduler()
}

/*
Public: Sets the scheduler Etch uses for coordinating DOM updates.
* `scheduler` {Scheduler}
*/
static setScheduler (scheduler) {
etch.setScheduler(scheduler)
}

/*
Public: Updates the component's properties and re-renders it. Only the
properties you specify in this object will update – any other properties
the component stores will be unaffected.
* `props` an {Object} representing the properties you want to update
*/
update (props) {
const oldProps = this.props
this.props = Object.assign({}, oldProps, props)
return etch.update(this)
}

updateSync (props) {
const oldProps = this.props
this.props = Object.assign({}, oldProps, props)
return etch.updateSync(this)
}

/*
Public: Destroys the component, removing it from the DOM.
*/
destroy (removeNode = false) {
etch.destroy(this, removeNode)
}

render () {
throw new Error('Etch components must implement a `render` method')
}
}
212 changes: 0 additions & 212 deletions lib/ethereum-interface-view.coffee

This file was deleted.

0 comments on commit beeb333

Please sign in to comment.