Opened 9 years ago

Closed 9 years ago

#6798 closed bug (notabug)

more useful interaction with handles.

Reported by: velocityzen Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.slider Version: 1.8.7
Keywords: Cc:
Blocked by: Blocking:

Description

_slide: function( event, index, newVal ) {

var otherVal,

newValues, allowed;

if ( this.options.values && this.options.values.length ) {

otherVal = this.values( index ? 0 : 1 );

if ( this.options.values.length === 2 && this.options.range === true ) {

if ( index === 0 && newVal > otherVal ) {

index = 1;

} else if ( index === 1 && newVal < otherVal ) {

index = 0;

} this._handleIndex = index; this.handles[index].focus();

}

if ( newVal !== this.values( index ) ) {

newValues = this.values(); newValues[ index ] = newVal; A slide can be canceled by returning false from the slide callback allowed = this._trigger( "slide", event, {

handle: this.handles[ index ], value: newVal, values: newValues

} ); otherVal = this.values( index ? 0 : 1 ); if ( allowed !== false ) {

this.values( index, newVal, true );

}

}

} else {

if ( newVal !== this.value() ) {

A slide can be canceled by returning false from the slide callback allowed = this._trigger( "slide", event, {

handle: this.handles[ index ], value: newVal

} ); if ( allowed !== false ) {

this.value( newVal );

}

}

}

},​

Change History (1)

comment:1 Changed 9 years ago by Scott González

Resolution: invalid
Status: newclosed

Please create a new ticket with an actual description. Also, please don't paste code into tickets.

Note: See TracTickets for help on using tickets.