Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Conversation

whitneyit
Copy link
Contributor

Previously when a model was set with a value outside of the min or
the max of the slider, it would call setSliderPercent with the
initial value and no check would occur to make sure that the value of
the model could not extend the range of the slider.

The below screenshot demonstrates what the slider looks like when it has
been initialised with a value of -1.

screenshot

As you can see, the thumb is floating way off to the left. This is due
to the left: -25% style that has been applied to the element. It is
worth noting that the min and max are 0 and 4 respectively.

Previously when a model was set with a value outside of the `min` or
the `max` of the slider, it would call `setSliderPercent` with the
initial value and no check would occur to make sure that the value of
the model could not extend the range of the slider.

The below screenshot demonstrates what the slider looks like when it has
been initialised with a value of `-1`.

![screenshot](http://i.imgur.com/BxBpz2J.png)

As you can see, the thumb is floating way off to the left. This is due
to the `left: -25%` style that has been applied to the element. It is
worth noting that the `min` and `max` are `0` and `4` respectively.
@ThomasBurleson
Copy link
Contributor

lgtm.

@ThomasBurleson ThomasBurleson added the pr: merge ready This PR is ready for a caretaker to review label Jan 28, 2016
@ThomasBurleson ThomasBurleson added this to the 1.0.4 milestone Jan 28, 2016
@ThomasBurleson ThomasBurleson self-assigned this Jan 28, 2016
@ThomasBurleson ThomasBurleson changed the title Clamp md-slider's initialisation fix(slider): clamp md-slider's initialisation Jan 28, 2016
@whitneyit whitneyit deleted the fix/clamp-slider branch January 29, 2016 02:56
ErinCoughlan pushed a commit to ErinCoughlan/material that referenced this pull request Feb 9, 2016
Previously when a model was set with a value outside of the `min` or
the `max` of the slider, it would call `setSliderPercent` with the
initial value and no check would occur to make sure that the value of
the model could not extend the range of the slider.

The below screenshot demonstrates what the slider looks like when it has
been initialised with a value of `-1`.

![screenshot](http://i.imgur.com/BxBpz2J.png)

As you can see, the thumb is floating way off to the left. This is due
to the `left: -25%` style that has been applied to the element. It is
worth noting that the `min` and `max` are `0` and `4` respectively.

  Closes angular#6858
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr: merge ready This PR is ready for a caretaker to review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants