Search and Top Navigation
#6798 closed bug (notabug)
Opened January 01, 2011 04:50PM UTC
Closed January 03, 2011 01:31PM UTC
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 );
}
}
}
},
Attachments (0)
Change History (1)
Changed January 03, 2011 01:31PM UTC by comment:1
resolution: | → invalid |
---|---|
status: | new → closed |
Please create a new ticket with an actual description. Also, please don't paste code into tickets.