remove highlights on unload

pull/5370/head
LianaHus 5 years ago committed by ioedeveloper
parent 216aed0d06
commit 3fbb135ba0
  1. 8
      apps/remix-ide/src/app/tabs/debugger-tab.js
  2. 3
      apps/remix-ide/src/app/tabs/debugger/debuggerUI.js

@ -61,7 +61,8 @@ class DebuggerTab extends ViewPlugin {
(address, receipt) => { (address, receipt) => {
const target = (address && remixLib.helpers.trace.isContractCreation(address)) ? receipt.contractAddress : address const target = (address && remixLib.helpers.trace.isContractCreation(address)) ? receipt.contractAddress : address
return this.call('fetchAndCompile', 'resolve', target || receipt.contractAddress || receipt.to, '.debug', this.blockchain.web3()) return this.call('fetchAndCompile', 'resolve', target || receipt.contractAddress || receipt.to, '.debug', this.blockchain.web3())
}) }
)
this.call('manager', 'activatePlugin', 'source-verification') this.call('manager', 'activatePlugin', 'source-verification')
// this.call('manager', 'activatePlugin', 'udapp') // this.call('manager', 'activatePlugin', 'udapp')
@ -69,6 +70,11 @@ class DebuggerTab extends ViewPlugin {
return this.el return this.el
} }
deactivate () {
this.debuggerUI.unLoad()
super.deactivate()
}
debug (hash) { debug (hash) {
if (this.debuggerUI) this.debuggerUI.debug(hash) if (this.debuggerUI) this.debuggerUI.debug(hash)
} }

@ -206,7 +206,8 @@ class DebuggerUI {
return view return view
} }
unLoad () { async unLoad () {
await this.debuggerModule.call('editor', 'discardHighlight')
yo.update(this.debuggerHeadPanelsView, yo`<div></div>`) yo.update(this.debuggerHeadPanelsView, yo`<div></div>`)
yo.update(this.debuggerPanelsView, yo`<div></div>`) yo.update(this.debuggerPanelsView, yo`<div></div>`)
yo.update(this.stepManagerView, yo`<div></div>`) yo.update(this.stepManagerView, yo`<div></div>`)

Loading…
Cancel
Save