src/aria/touch/widgets/Slider.js
function (evt) {
            if (evt.type === "tap") {
                var cfg = this._cfg;
                if (!cfg) {
                    // Widget already disposed
                    return true;
                }

                if ((cfg.tapToToggle || cfg.tapToMove) && this._isSwitch) {
                    // With this configuration, on tap we want to toggle the value
                    this._value = this._value >= this._switchThreshold ? 0 : 1;
                } else if (cfg.tapToMove) {
                    this._savedX = evt.detail.currentX - this._sliderDimension.x - this._sliderWidth / 2;
                    this._savedX = (this._savedX > this._railWidth) ? this._railWidth : this._savedX;
                    this._value = Math.max(this._savedX / this._railWidth, 0);
                }
                this._storeValue();
                this._setLeftPosition();
                this._updateDisplay();
            }
        }
function (evt) {
            if (evt.type === "tap") {
                var cfg = this._cfg;
                if (!cfg) {
                    // Widget already disposed
                    return true;
                }

                if ((cfg.tapToToggle || cfg.tapToMove) && this._isSwitch) {
                    // With this configuration, on tap we want to toggle the value
                    this._value = this._value >= this._switchThreshold ? 0 : 1;
                } else if (cfg.tapToMove) {
                    this._savedX = evt.detail.currentX - this._sliderDimension.x - this._sliderWidth / 2;
                    this._savedX = (this._savedX > this._railWidth) ? this._railWidth : this._savedX;
                    this._value = Math.max(this._savedX / this._railWidth, 0);
                }
                this._storeValue();
                this._setLeftPosition();
                this._updateDisplay();
            }
        }
function ( evt ) { if ( evt . type === "tap" ) { var cfg = this . _cfg ; if ( ! cfg ) { // Widget already disposed return true ; } if ( ( cfg . tapToToggle || cfg . tapToMove ) && this . _isSwitch ) { // With this configuration, on tap we want to toggle the value this . _value = this . _value >= this . _switchThreshold ? 0 : 1 ; } else if ( cfg . tapToMove ) { this . _savedX = evt . detail . currentX - this . _sliderDimension . x - this . _sliderWidth / 2 ; this . _savedX = ( this . _savedX > this . _railWidth ) ? this . _railWidth : this . _savedX ; this . _value = Math . max ( this . _savedX / this . _railWidth , 0 ) ; } this . _storeValue ( ) ; this . _setLeftPosition ( ) ; this . _updateDisplay ( ) ; } }
Handle delegated events
@param {HTMLEvent} evt Browser event
Handle delegated events