Commit d35ba6eb authored by yann300's avatar yann300

load solidity slider when callTreeReady

parent b5ae8417
...@@ -20,7 +20,6 @@ function StepManager (_parent, _traceManager) { ...@@ -20,7 +20,6 @@ function StepManager (_parent, _traceManager) {
console.log(error) console.log(error)
} else { } else {
self.slider.init(length) self.slider.init(length)
self.soliditySlider.init(self.parent.callTree.reducedTraceBySourceLocation.length)
self.init() self.init()
} }
}) })
...@@ -32,11 +31,24 @@ function StepManager (_parent, _traceManager) { ...@@ -32,11 +31,24 @@ function StepManager (_parent, _traceManager) {
self.soliditySlider.setValue(step) self.soliditySlider.setValue(step)
}) })
this.soliditySlider = new SoliditySlider(this.traceManager, self.parent.callTree.reducedTraceBySourceLocation) this.soliditySlider = new SoliditySlider(this.traceManager)
this.soliditySlider.event.register('moved', this, function (srcLocationStep) {
var step = self.parent.callTree.reducedTraceBySourceLocation[srcLocationStep] this.parent.callTree.event.register('callTreeReady', () => {
self.sliderMoved(step) this.soliditySlider.setReducedTrace(this.parent.callTree.reducedTraceBySourceLocation)
self.slider.setValue(step) this.soliditySlider.event.register('moved', this, function (srcLocationStep) {
var step = self.parent.callTree.reducedTraceBySourceLocation[srcLocationStep]
self.sliderMoved(step)
self.slider.setValue(step)
})
this.parent.vmDebugger.asmCode.event.register('hide', () => {
this.soliditySlider.show()
this.slider.hide()
})
this.parent.vmDebugger.asmCode.event.register('show', () => {
this.soliditySlider.hide()
this.slider.show()
})
}) })
this.buttonNavigator = new ButtonNavigator(_parent, this.traceManager) this.buttonNavigator = new ButtonNavigator(_parent, this.traceManager)
...@@ -61,17 +73,6 @@ function StepManager (_parent, _traceManager) { ...@@ -61,17 +73,6 @@ function StepManager (_parent, _traceManager) {
this.buttonNavigator.event.register('jumpToException', this, function (exceptionIndex) { this.buttonNavigator.event.register('jumpToException', this, function (exceptionIndex) {
self.jumpTo(exceptionIndex) self.jumpTo(exceptionIndex)
}) })
if (this.parent.solidityProxy.loaded()) {
this.parent.vmDebugger.asmCode.register('hide', () => {
this.soliditySlider.show()
this.slider.hide()
})
this.parent.vmDebugger.asmCode.register('show', () => {
this.soliditySlider.hide()
this.slider.show()
})
}
} }
StepManager.prototype.render = function () { StepManager.prototype.render = function () {
......
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