Commit 2b84d962 authored by LianaHus's avatar LianaHus

rename the function

parent c5e65892
...@@ -239,7 +239,7 @@ class CompilerContainer { ...@@ -239,7 +239,7 @@ class CompilerContainer {
} }
} }
autoCompile () { compileIfAutoCompileOn () {
if (this.config.get('autoCompile')) { if (this.config.get('autoCompile')) {
this.compile() this.compile()
} }
...@@ -247,17 +247,17 @@ class CompilerContainer { ...@@ -247,17 +247,17 @@ class CompilerContainer {
hideWarnings (event) { hideWarnings (event) {
this.config.set('hideWarnings', this._view.hideWarningsBox.checked) this.config.set('hideWarnings', this._view.hideWarningsBox.checked)
this.autoCompile() this.compileIfAutoCompileOn()
} }
onchangeOptimize () { onchangeOptimize () {
this.compileTabLogic.setOptimize(!!this._view.optimize.checked) this.compileTabLogic.setOptimize(!!this._view.optimize.checked)
this.autoCompile() this.compileIfAutoCompileOn()
} }
onchangeLanguage (event) { onchangeLanguage (event) {
this.compileTabLogic.setLanguage(event.target.value) this.compileTabLogic.setLanguage(event.target.value)
this.autoCompile() this.compileIfAutoCompileOn()
} }
onchangeEvmVersion (_) { onchangeEvmVersion (_) {
...@@ -267,7 +267,7 @@ class CompilerContainer { ...@@ -267,7 +267,7 @@ class CompilerContainer {
v = null v = null
} }
this.compileTabLogic.setEvmVersion(v) this.compileTabLogic.setEvmVersion(v)
this.autoCompile() this.compileIfAutoCompileOn()
} }
onchangeLoadVersion (event) { onchangeLoadVersion (event) {
...@@ -351,7 +351,7 @@ class CompilerContainer { ...@@ -351,7 +351,7 @@ class CompilerContainer {
scheduleCompilation () { scheduleCompilation () {
if (!this.config.get('autoCompile')) return if (!this.config.get('autoCompile')) return
if (this.data.compileTimeout) window.clearTimeout(this.data.compileTimeout) if (this.data.compileTimeout) window.clearTimeout(this.data.compileTimeout)
this.data.compileTimeout = window.setTimeout(() => this.autoCompile(), this.data.timeout) this.data.compileTimeout = window.setTimeout(() => this.compileIfAutoCompileOn(), this.data.timeout)
} }
} }
......
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