Slider: add support for crossing multiple handles #1892
+55
−14
Conversation
With this patch, a slider which has both "range = true" and "allowCrossingHandles = true" automatically determines the handlers starting and stopping the range. Handlers can freely cross each other.
|
I need some help with the test: I can't simulate a handle drag event (commented code in the test). it dies with: |
crskbel-ca
reviewed
Mar 7, 2020
crskbel-ca
reviewed
Mar 7, 2020
| @@ -22,6 +22,7 @@ common.testWidget( "slider", { | |||
| step: 1, | |||
| value: 0, | |||
| values: null, | |||
| allowCrossingHandles: false, | |||
| @@ -401,4 +401,24 @@ QUnit.test( "range", function( assert ) { | |||
| element.slider( "destroy" ); | |||
| @@ -22,6 +22,7 @@ common.testWidget( "slider", { | |||
| step: 1, | |||
| value: 0, | |||
| values: null, | |||
| allowCrossingHandles: false, | |||
|
|
|||
Duplicate of #
| assert.deepEqual( element.slider( "values" ), [ 25, 75 ], "values" ); | ||
|
|
||
| // var handles = element.find( ".ui-slider-handle" ); | ||
| // handles.eq( 0 ).simulate( "drag", { dx: 1000 } ); |
#1853
Duplicate of #
| }, { | ||
| queue: false, | ||
| duration: o.animate | ||
| } ); | ||
| } | ||
| } else { | ||
| if ( i === 0 ) { | ||
| if ( i === rangeStartIndex ) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
With this patch, a slider which has both "range = true" and "allowCrossingHandles = true" automatically determines the handlers starting and stopping the range. Handlers can freely cross each other.
Follow-up of #1869
The text was updated successfully, but these errors were encountered: