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

Commit

Permalink
fix(slider): adds padding inside of slider to fit the thumb
Browse files Browse the repository at this point in the history
Closes #1343
  • Loading branch information
Robert Messerle committed Feb 6, 2015
1 parent d70094d commit 8093c30
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
32 changes: 17 additions & 15 deletions src/components/slider/slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,22 @@ function SliderDirective($$rAF, $window, $mdAria, $mdUtil, $mdConstant, $mdThemi
scope: {},
require: '?ngModel',
template:
'<div class="md-track-container">' +
'<div class="md-track"></div>' +
'<div class="md-track md-track-fill"></div>' +
'<div class="md-track-ticks"></div>' +
'</div>' +
'<div class="md-thumb-container">' +
'<div class="md-thumb"></div>' +
'<div class="md-focus-thumb"></div>' +
'<div class="md-focus-ring"></div>' +
'<div class="md-sign">' +
'<span class="md-thumb-text"></span>' +
'</div>' +
'<div class="md-disabled-thumb"></div>' +
'</div>',
'<div class="md-slider-wrapper">\
<div class="md-track-container">\
<div class="md-track"></div>\
<div class="md-track md-track-fill"></div>\
<div class="md-track-ticks"></div>\
</div>\
<div class="md-thumb-container">\
<div class="md-thumb"></div>\
<div class="md-focus-thumb"></div>\
<div class="md-focus-ring"></div>\
<div class="md-sign">\
<span class="md-thumb-text"></span>\
</div>\
<div class="md-disabled-thumb"></div>\
</div>\
</div>',
link: postLink
};

Expand All @@ -85,7 +87,7 @@ function SliderDirective($$rAF, $window, $mdAria, $mdUtil, $mdConstant, $mdThemi
};

var isDisabledParsed = attr.ngDisabled && $parse(attr.ngDisabled);
var isDisabledGetter = isDisabledParsed ?
var isDisabledGetter = isDisabledParsed ?
function() { return isDisabledParsed(scope.$parent); } :
angular.noop;
var thumb = angular.element(element[0].querySelector('.md-thumb'));
Expand Down
6 changes: 6 additions & 0 deletions src/components/slider/slider.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ md-slider {
display: block;
margin-left: 4px;
margin-right: 4px;
padding: 0 24px;
overflow: hidden;

.md-slider-wrapper {
position: relative;
}

/**
* Track
Expand Down

0 comments on commit 8093c30

Please sign in to comment.