Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- jquery-ui/development-bundle/ui/jquery.ui.slider.js Tue Apr 16 09:08:44 2013
- +++ jquery-ui/development-bundle/ui/jquery.ui.slider.patched.js Wed Apr 17 10:33:27 2013
- @@ -46,6 +46,7 @@
- this._mouseSliding = false;
- this._animateOff = true;
- this._handleIndex = null;
- + this._chooseHandle = null;
- this._detectOrientation();
- this._mouseInit();
- @@ -218,13 +219,24 @@
- },
- _mouseStart: function() {
- + var values = this.values();
- +
- + this._chooseHandle = ( this.handles.length === 2 ) && ( values[0] === values[1] );
- +
- return true;
- },
- _mouseDrag: function( event ) {
- var position = { x: event.pageX, y: event.pageY },
- - normValue = this._normValueFromMouse( position );
- -
- + normValue = this._normValueFromMouse( position ),
- + values = this.values();
- +
- + if ( this._chooseHandle && ( normValue !== values[0] ) )
- + {
- + this._handleIndex = normValue < values[0] ? 0 : 1;
- + this._chooseHandle = false;
- + }
- +
- this._slide( event, this._handleIndex, normValue );
- return false;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement