Commit d56f79d4 authored by d11e9's avatar d11e9

only render contract interfaces if RHP is visible

parent 3290e6fc
...@@ -5,7 +5,7 @@ function UniversalDApp (contracts, options) { ...@@ -5,7 +5,7 @@ function UniversalDApp (contracts, options) {
this.renderOutputModifier = options.renderOutputModifier || function(name, content) { return content; }; this.renderOutputModifier = options.renderOutputModifier || function(name, content) { return content; };
if (!options.vm && web3.currentProvider) { if (!options.vm && web3.currentProvider) {
console.log("Provider already set")
} else if (options.vm) { } else if (options.vm) {
this.vm = new EthVm(); this.vm = new EthVm();
//@todo this does not calculate the gas costs correctly but gets the job done. //@todo this does not calculate the gas costs correctly but gets the job done.
......
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
var endpoint = $('#web3Endpoint').val(); var endpoint = $('#web3Endpoint').val();
web3.setProvider( new web3.providers.HttpProvider( endpoint ) ); web3.setProvider( new web3.providers.HttpProvider( endpoint ) );
compile(); compile();
} ); });
function executionContextChange (ev) { function executionContextChange (ev) {
if (ev.target.value == 'web3' && !confirm("Are you sure you want to connect to a local ethereum node?") ) { if (ev.target.value == 'web3' && !confirm("Are you sure you want to connect to a local ethereum node?") ) {
...@@ -467,7 +467,8 @@ ...@@ -467,7 +467,8 @@
$('.toggleRHP').click(function(){ $('.toggleRHP').click(function(){
toggledRHP = !toggledRHP; toggledRHP = !toggledRHP;
setEditorSize( toggledRHP ? 0 : window.localStorage[EDITOR_SIZE_CACHE_KEY] ); setEditorSize( toggledRHP ? 0 : window.localStorage[EDITOR_SIZE_CACHE_KEY] );
$('.toggleRHP').toggleClass('toggled', toggledRHP) $('.toggleRHP').toggleClass('toggled', toggledRHP);
if (!toggledRHP) compile();
}); });
...@@ -499,7 +500,6 @@ ...@@ -499,7 +500,6 @@
var previousInput = ''; var previousInput = '';
var sourceAnnotations = []; var sourceAnnotations = [];
var compile = function() { var compile = function() {
editor.getSession().clearAnnotations(); editor.getSession().clearAnnotations();
sourceAnnotations = []; sourceAnnotations = [];
editor.getSession().removeMarker(errMarkerId); editor.getSession().removeMarker(errMarkerId);
...@@ -530,7 +530,7 @@ ...@@ -530,7 +530,7 @@
}); });
} }
if (noFatalErrors) renderContracts(data, editor.getValue()); if (noFatalErrors && !toggledRHP) renderContracts(data, editor.getValue());
}; };
var compileTimeout = null; var compileTimeout = null;
......
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