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

fix(slider): adds padding inside of slider to fit the thumb #1391

Closed
wants to merge 1 commit into from

Conversation

robertmesserle
Copy link
Contributor

Closes #1343

@ajoslin ajoslin added the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label Feb 4, 2015
@robertmesserle
Copy link
Contributor Author

@ThomasBurleson Please note that this will cause styles to change for some users. Basically, in order for this to work, I had to add padding inside the actual slider wrapper, which causes the slider to shrink. If this is not how we expect it to work, then comment here and we can discuss alternative solutions.

function() { return isDisabledParsed(scope.$parent); } :
angular.noop;
var wrapper = angular.element(element[0].querySelector('.md-slider-wrapper'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you creating a unused wrapper variable?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question - I used it at one point while fixing this, but apparently, didn't end up needing it. Will remove.

@ThomasBurleson
Copy link
Contributor

@robertmesserle - This effectively creates a left/right 24px padding around md-slider so the thumb shows properly at the start/end ranges.

  • What about the ripple/focus indicators are those clipped?
  • Have you tested with hsizing of the md-slider... does that still work ?

@robertmesserle robertmesserle force-pushed the slider-padding-fix branch 2 times, most recently from 223dec7 to a22e6aa Compare February 6, 2015 01:39
@robertmesserle
Copy link
Contributor Author

@ThomasBurleson The 24px padding is the size needed for the focus/held state.

@sunny9240
Copy link

@robertmesserle This is not the right fix. size of slider became smaller because of padding.

@robertmesserle
Copy link
Contributor Author

@sunnyshah01 @ThomasBurleson Updated this PR to include a safer method that should not impact the size at all.

@robertmesserle robertmesserle force-pushed the slider-padding-fix branch 2 times, most recently from 4da082a to d7a7e48 Compare February 9, 2015 16:30
@ThomasBurleson
Copy link
Contributor

@robertmesserle - curl https:/angular/material/pull/1391.patch | git am failed.
Can you update your PR with a git pull --rebase origin master first? Thx.

@robertmesserle robertmesserle force-pushed the slider-padding-fix branch 2 times, most recently from d817edb to 18d47c4 Compare February 10, 2015 20:19
@ajoslin ajoslin removed the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label Feb 10, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

md-slider width increases when slide to right
4 participants