fix issues with lack of view

pull/1/head
Iuri Matias 6 years ago committed by yann300
parent 578137ad2e
commit a6217e5cc6
  1. 1
      src/app/debugger/debuggerUI/ButtonNavigator.js
  2. 3
      src/app/debugger/debuggerUI/Slider.js
  3. 1
      src/app/debugger/debuggerUI/StepManager.js

@ -128,6 +128,7 @@ ButtonNavigator.prototype.updateDisabled = function (id, disabled) {
}
ButtonNavigator.prototype.resetWarning = function (revertedReason) {
if (!this.view) return
this.view.querySelector('#reverted #outofgas').style.display = (revertedReason === 'outofgas') ? 'inline' : 'none'
this.view.querySelector('#reverted #parenthasthrown').style.display = (revertedReason === 'parenthasthrown') ? 'inline' : 'none'
this.view.querySelector('#reverted').style.display = (revertedReason === '') ? 'none' : 'block'

@ -13,6 +13,7 @@ class Slider {
}
setSliderLength (length) {
if (!this.view) return
this.view.querySelector('#slider').setAttribute('max', length - 1)
this.max = length - 1
this.disabled = (length === 0)
@ -27,6 +28,7 @@ class Slider {
}
onChange (event) {
if (!this.view) return
var value = parseInt(this.view.querySelector('#slider').value)
if (value === this.previousValue) return
@ -35,6 +37,7 @@ class Slider {
}
setValue (value) {
if (!this.view) return
this.view.querySelector('#slider').value = value
}

@ -35,6 +35,7 @@ StepManager.prototype.startButtonNavigator = function () {
}
StepManager.prototype.updateStep = function (step, stepState, jumpOutDisabled) {
if (!this.slider) return
this.slider.setValue(step)
this.buttonNavigator.stepChanged(stepState, jumpOutDisabled)
this.event.trigger('stepChanged', [step])

Loading…
Cancel
Save