add reset method to CodeListView

pull/1/head
Iuri Matias 6 years ago committed by yann300
parent 3fce0ac98a
commit f1881a37ab
  1. 4
      src/app/debugger/debuggerUI/VmDebugger.js
  2. 4
      src/app/debugger/debuggerUI/vmDebugger/CodeListView.js

@ -75,9 +75,7 @@ function VmDebugger (_parentUI, _traceManager, _codeManager, _solidityProxy, _ca
this.asmCode = new CodeListView()
this.vmDebuggerLogic.event.register('codeManagerChanged', this.asmCode.changed.bind(this.asmCode))
this.vmDebuggerLogic.event.register('traceUnloaded', function () {
self.asmCode.changed([], '', -1)
})
this.vmDebuggerLogic.event.register('traceUnloaded', this.asmCode.reset.bind(this.asmCode))
this.calldataPanel = new CalldataPanel()
_parentUI.event.register('indexChanged', this, function (index) {

@ -52,6 +52,10 @@ CodeListView.prototype.indexChanged = function (index) {
this.codeView.scrollTop = this.itemSelected.offsetTop - parseInt(this.codeView.offsetTop)
}
CodeListView.prototype.reset = function () {
this.changed([], '', -1)
}
CodeListView.prototype.changed = function (code, address, index) {
if (this.address === address) {
return this.indexChanged(index)

Loading…
Cancel
Save