From 9ba8d686993184512738aa03f1f16a4496f3c94f Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 27 Oct 2016 13:55:58 +0200 Subject: [PATCH] ui changes --- src/ui/ButtonNavigator.js | 14 +++++++++----- src/ui/Ethdebugger.js | 2 +- src/ui/StepManager.js | 2 +- src/ui/styles/sliderStyles.js | 2 +- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/ui/ButtonNavigator.js b/src/ui/ButtonNavigator.js index c565fbf9c1..8c66404180 100644 --- a/src/ui/ButtonNavigator.js +++ b/src/ui/ButtonNavigator.js @@ -44,6 +44,14 @@ ButtonNavigator.prototype.render = function () { return view } +ButtonNavigator.prototype.reset = function () { + this.intoBackDisabled = true + this.overBackDisabled = true + this.intoForwardDisabled = true + this.overForwardDisabled = true + this.nextCallDisabled = true +} + ButtonNavigator.prototype.stepChanged = function (step) { this.intoBackDisabled = step <= 0 this.overBackDisabled = step <= 0 @@ -55,11 +63,7 @@ ButtonNavigator.prototype.stepChanged = function (step) { var self = this this.traceManager.getLength(function (error, length) { if (error) { - self.intoBackDisabled = true - self.overBackDisabled = true - self.intoForwardDisabled = true - self.overForwardDisabled = true - self.nextCallDisabled = true + self.reset() console.log(error) } else { self.intoForwardDisabled = step >= length - 1 diff --git a/src/ui/Ethdebugger.js b/src/ui/Ethdebugger.js index e59dc40b39..ec339d0148 100644 --- a/src/ui/Ethdebugger.js +++ b/src/ui/Ethdebugger.js @@ -81,7 +81,7 @@ Ethdebugger.prototype.debug = function (tx) { Ethdebugger.prototype.render = function () { var view = yo`
-
+
${this.txBrowser.render()} ${this.stepManager.render()}
diff --git a/src/ui/StepManager.js b/src/ui/StepManager.js index 9cbb4e9e6f..4f16ac5e82 100644 --- a/src/ui/StepManager.js +++ b/src/ui/StepManager.js @@ -56,7 +56,7 @@ StepManager.prototype.render = function () { StepManager.prototype.reset = function () { this.slider.setValue(0) this.currentStepIndex = 0 - this.buttonNavigator.stepChanged(0) + this.buttonNavigator.reset() } StepManager.prototype.init = function () { diff --git a/src/ui/styles/sliderStyles.js b/src/ui/styles/sliderStyles.js index 208e6602ad..45912b6380 100644 --- a/src/ui/styles/sliderStyles.js +++ b/src/ui/styles/sliderStyles.js @@ -1,6 +1,6 @@ 'use strict' module.exports = { rule: { - 'width': '98%' + 'width': '100%' } }