ker/mod/tfw.view.slider.js
function onDrag(evt) {
    const
        rect = this._rect,
        x = valueToX.call(this, this._value),
        min = -x,
        max = rect.width - x,
        tx = clamp(evt.x - evt.x0, min, max),
        value = xToValue.call(this, x + tx);
    Dom.css(this.$elements.button, { transform: `translateX(${tx}px)` });
    this.displayedValue = valueToDisplayedValue.call(this, value);
    if (this.smooth) {
        this._dragging = true;
        this.value = value;
    }
}
function onDrag(evt) {
    const
        rect = this._rect,
        x = valueToX.call(this, this._value),
        min = -x,
        max = rect.width - x,
        tx = clamp(evt.x - evt.x0, min, max),
        value = xToValue.call(this, x + tx);
    Dom.css(this.$elements.button, { transform: `translateX(${tx}px)` });
    this.displayedValue = valueToDisplayedValue.call(this, value);
    if (this.smooth) {
        this._dragging = true;
        this.value = value;
    }
}
function onDrag ( evt ) { const rect = this . _rect , x = valueToX . call ( this , this . _value ) , min = - x , max = rect . width - x , tx = clamp ( evt . x - evt . x0 , min , max ) , value = xToValue . call ( this , x + tx ) ; Dom . css ( this . $elements . button , { transform : ` ${ tx } ` } ) ; this . displayedValue = valueToDisplayedValue . call ( this , value ) ; if ( this . smooth ) { this . _dragging = true ; this . value = value ; } }
Drag the button.

@this ViewXJS
@param   {object} evt - `{ x, ... }`
@returns {undefined}
Drag the button .