Requires

Provides

Slider.js

Methods to update slider without reinitializing the thing

License:
MIT-style license.
  1. 21
  2. 22
  3. 23
  4. 24
  5. 25
Slider.implement({ update: function() { var offset = (this.options.mode == 'vertical') ? 'offsetHeight' : 'offsetWidth' this.half = this.knob[offset] / 2; this.full = this.element[offset] - this.knob[offset] + (this.options.offset * 2);

this.setRange(this.options.range);

  1. 29
  2. 30
  3. 31
  4. 32
  5. 33
  6. 34
this.knob.setStyle(this.property, this.toPosition(this.step)); var X = this.axis.capitalize(); this.drag['setMin' + X](- this.options.offset) this.drag['setMax' + X](this.full - this.options.offset) } })