remove method/simplify

pull/1/head
Iuri Matias 6 years ago committed by yann300
parent 860735be7d
commit f282310f36
  1. 17
      src/app/debugger/debuggerUI/Slider.js

@ -38,8 +38,14 @@ class Slider {
var slider = this.view.querySelector('#slider')
slider.setAttribute('max', length - 1)
this.max = length - 1
this.updateDisabled(length === 0)
this.disabled = length === 0
this.disabled = (length === 0)
if (this.disabled) {
this.view.querySelector('#slider').setAttribute('disabled', true)
} else {
this.view.querySelector('#slider').removeAttribute('disabled')
}
this.setValue(0)
}
@ -61,13 +67,6 @@ class Slider {
this.view.querySelector('#slider').value = value
}
updateDisabled (disabled) {
if (disabled) {
this.view.querySelector('#slider').setAttribute('disabled', true)
} else {
this.view.querySelector('#slider').removeAttribute('disabled')
}
}
}
module.exports = Slider

Loading…
Cancel
Save