-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat(slider): vertical slider, UI fixes and bug fixes #6538
Conversation
f9554e0
to
1e37d5d
Compare
d2ce2fa
to
7173881
Compare
function SliderContainerDirective() { | ||
return { | ||
compile: function (elem) { | ||
var slider = angular.element(elem[0].getElementsByTagName('md-slider')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you can replace this with
var slider = elem.find('md-slider');
since you are finding an element, and not using a CSS query selector.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right
Aside from my line-comments above, I have seen a few visual issues when running the demos:
|
7173881
to
0727cfc
Compare
@topherfangio Talked to thomas about the disaplay: flex,
justify-content: center and he said it's ok but just add |
0727cfc
to
e04dd2c
Compare
e04dd2c
to
81bae90
Compare
@@ -280,8 +404,8 @@ function SliderDirective($$rAF, $window, $mdAria, $mdUtil, $mdConstant, $mdThemi | |||
function stepValidator(value) { | |||
if (angular.isNumber(value)) { | |||
var formattedValue = (Math.round((value - min) / step) * step + min); | |||
// Format to 3 digits after the decimal point - fixes #2015. | |||
return (Math.round(formattedValue * 1000) / 1000); | |||
// Format to 6 digits after the decimal point. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I've seen this value changed like 3 times now. Perhaps we should make it configurable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree
0f41386
to
f1b7529
Compare
I think this should be a 1.1.0 change as it modifies the structure of the the slider and makes a lot of changes that might potentially be breaking. |
I don't think postponing this to 1.1.0 is smart, there're more additions than breaking changes.. I agree that this shouldn't be on the minor branch but on master for sure, more than that postponing it will make the rebasing even more hard for me. |
f1b7529
to
c176251
Compare
- Added vertical slider - Improved UI - Fixed dynamic min/max with values not in range - Added round attribute to set how many numbers should be after the dot, default is 3, maximum is 6 to prevent scientific notation. - Made input width grow or shrink according the text length - Added discrete readonly mode - Added disabled on slider container fixes #4371, #3259, #2421, #1221, #4576, #6996, #7093, #7093 closes #5874, #5872, #6051
c176251
to
914b35b
Compare
@elad master is 1.1.0 :-) |
ah 👍 didn't realized it lol @topherfangio is this still needs to be reviewed? |
@EladBezalel Just left one more comment re: the arrow keys, but I think that can be a separate discussion/PR if we want to do it later. |
Fixed with SHA e0abeb4 |
fixes #4371, #3259, #2421, #1221, #4576, #6996, #7093, #7093
closes #5874, #5872, #6051