diff --git a/src/app/analysis-tab.js b/src/app/analysis-tab.js
index 5506ee4247..8c5dce4bd0 100644
--- a/src/app/analysis-tab.js
+++ b/src/app/analysis-tab.js
@@ -21,7 +21,7 @@ var css = csjs`
module.exports = analysisTab
-function analysisTab (container, API, events, opts) {
+function analysisTab (container, appAPI, events, opts) {
var el = yo`
diff --git a/src/app/righthand-panel.js b/src/app/righthand-panel.js
index a1c4fe6cfa..3a70abafdb 100644
--- a/src/app/righthand-panel.js
+++ b/src/app/righthand-panel.js
@@ -1,4 +1,3 @@
-var csjs = require('csjs-inject')
var yo = require('yo-yo')
var $ = require('jquery')
@@ -13,8 +12,7 @@ var filesTab = require('./files-tab')
module.exports = RighthandPanel
-function RighthandPanel (container, API, events, opts) {
-
+function RighthandPanel (container, appAPI, events, opts) {
var optionViews = yo`
`
var element = yo`
@@ -34,11 +32,11 @@ function RighthandPanel (container, API, events, opts) {
`
- contractTab(optionViews, API, events, opts)
- settingsTab(optionViews, API, events, opts)
- analysisTab(optionViews, API, events, opts)
- debuggerTab(optionViews, API, events, opts)
- filesTab(optionViews, API, events, opts)
+ contractTab(optionViews, appAPI, events, opts)
+ settingsTab(optionViews, appAPI, events, opts)
+ analysisTab(optionViews, appAPI, events, opts)
+ debuggerTab(optionViews, appAPI, events, opts)
+ filesTab(optionViews, appAPI, events, opts)
container.appendChild(element)
// ----------------- toggle right hand panel -----------------
@@ -46,7 +44,7 @@ function RighthandPanel (container, API, events, opts) {
var hidingRHP = false
$('.toggleRHP').click(function () {
hidingRHP = !hidingRHP
- setEditorSize(hidingRHP ? 0 : API.config.get(EDITOR_WINDOW_SIZE))
+ setEditorSize(hidingRHP ? 0 : appAPI.config.get(EDITOR_WINDOW_SIZE))
$('.toggleRHP i').toggleClass('fa-angle-double-right', !hidingRHP)
$('.toggleRHP i').toggleClass('fa-angle-double-left', hidingRHP)
})
@@ -54,14 +52,14 @@ function RighthandPanel (container, API, events, opts) {
// ----------------- tabbed menu -----------------
var tabbedMenuAPI = {
warnCompilerLoading: function (msg) {
- API.renderer.clear()
+ appAPI.renderer.clear()
if (msg) {
- API.renderer.error(msg, $('#output'), {type: 'warning'})
+ appAPI.renderer.error(msg, $('#output'), {type: 'warning'})
}
}
}
// load tabbed menu component
- var tabContainer = undefined // @TODO
+ var tabContainer // @TODO
var tabEvents = {compiler: events.compiler, app: events.app}
tabbedMenu(tabContainer, tabbedMenuAPI, tabEvents, {})
@@ -91,7 +89,7 @@ function RighthandPanel (container, API, events, opts) {
function setEditorSize (delta) {
$('#righthand-panel').css('width', delta)
$('#editor').css('right', delta)
- API.onResize()
+ appAPI.onResize()
}
function getEditorSize () {
@@ -106,15 +104,14 @@ function RighthandPanel (container, API, events, opts) {
dragging = false
delta = (delta < 50) ? 50 : delta
setEditorSize(delta)
- API.config.set(EDITOR_WINDOW_SIZE, delta)
- API.reAdjust()
+ appAPI.config.set(EDITOR_WINDOW_SIZE, delta)
+ appAPI.reAdjust()
}
})
- if (API.config.exists(EDITOR_WINDOW_SIZE)) {
- setEditorSize(API.config.get(EDITOR_WINDOW_SIZE))
+ if (appAPI.config.exists(EDITOR_WINDOW_SIZE)) {
+ setEditorSize(appAPI.config.get(EDITOR_WINDOW_SIZE))
} else {
- API.config.set(EDITOR_WINDOW_SIZE, getEditorSize())
+ appAPI.config.set(EDITOR_WINDOW_SIZE, getEditorSize())
}
-
}
diff --git a/src/app/tabbed-menu.js b/src/app/tabbed-menu.js
index 7893fbd929..8959e4e709 100644
--- a/src/app/tabbed-menu.js
+++ b/src/app/tabbed-menu.js
@@ -3,7 +3,7 @@ var loadingSpinner = require('./loading-spinner')
module.exports = tabbedMenu
-function tabbedMenu (container, API, events, opts) {
+function tabbedMenu (container, appAPI, events, opts) {
$('#options li').click(function (ev) {
var $el = $(this)
selectTab($el)
@@ -24,7 +24,7 @@ function tabbedMenu (container, API, events, opts) {
var spinner = loadingSpinner()
settingsTab.appendChild(spinner)
- API.warnCompilerLoading('Solidity compiler is currently loading. Please wait a moment...')
+ appAPI.warnCompilerLoading('Solidity compiler is currently loading. Please wait a moment...')
events.compiler.register('compilerLoaded', finish)
function finish () {
events.compiler.unregister('compilerLoaded', finish)