add reset method to CodeListView

pull/3094/head
Iuri Matias 6 years ago committed by yann300
parent 87b5d355a0
commit 41832538e1
  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.asmCode = new CodeListView()
this.vmDebuggerLogic.event.register('codeManagerChanged', this.asmCode.changed.bind(this.asmCode)) this.vmDebuggerLogic.event.register('codeManagerChanged', this.asmCode.changed.bind(this.asmCode))
this.vmDebuggerLogic.event.register('traceUnloaded', function () { this.vmDebuggerLogic.event.register('traceUnloaded', this.asmCode.reset.bind(this.asmCode))
self.asmCode.changed([], '', -1)
})
this.calldataPanel = new CalldataPanel() this.calldataPanel = new CalldataPanel()
_parentUI.event.register('indexChanged', this, function (index) { _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) this.codeView.scrollTop = this.itemSelected.offsetTop - parseInt(this.codeView.offsetTop)
} }
CodeListView.prototype.reset = function () {
this.changed([], '', -1)
}
CodeListView.prototype.changed = function (code, address, index) { CodeListView.prototype.changed = function (code, address, index) {
if (this.address === address) { if (this.address === address) {
return this.indexChanged(index) return this.indexChanged(index)

Loading…
Cancel
Save