-
-
Notifications
You must be signed in to change notification settings - Fork 495
feat(pointerColor): Adding feature for dynamic pointer color based on… #253
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Current coverage is
|
Looks very close to what I was working towards but you did it better which is awesome to see! Thanks for taking this over BlackIPS, made props |
Thanks for contributing, this looks clean. I have added a demo to your PR description. Just a few remarks:
vm.slider = {
minVal: 100,
maxVal: 400,
options: {
floor: 0,
ceil: 500,
pointerColor: function(val, pointerType) { // pointerType is 'min' or 'max'
if(pointerType === 'min')
return MinColor(val);
else
return MaxColor(val);
}
}
}
|
Thanks for feedback guys! I'd pushed my changes to my branch and updated the demo to match the new option naming and added a more "colorful" example for the range slider. All suggestions by @ValentinH has been implemented except for unit tests. I'm sorry but I couldn't get into it right now but will do later this day. Please have a look at http://jsfiddle.net/as1r9h44/1/ for the updated demo. |
Seems good! Actually I noticed that the option definition for |
Hey @ValentinH, I have added some unit tests and verified that they work as expected. I would be happy if you could review them. If you approve these changes provide some informations for further merging please. I would be happy if it make it in your package soon :) All the best! |
👍 Looks good to me: coverage is now 100% but can't be seen here because there are merge conflicts. |
… the value Changing the color of the pointer of a slider based on the value. Just pass a function to the 'pointerColor' option which returns a valid CSS color definition (either hex or named) and let the pointer shine in the brightest colors
Thanks for approval! I'm done squashing my changes and perform a rebase against your latest version 2.7.1. Please check it and hopefully merge it. :) Thanks for your help! |
feat(pointerColor): Adding feature for dynamic pointer color.
Merged and released under 2.8.0. Thanks for contributing ;) |
Adding feature for dynamic pointer color based on the value.
Changing the color of the pointer of a slider based on the value. Just pass a function to the 'pointerColor' option which returns a valid CSS color definition (either hex or named) and let the pointer shine in the brightest colors
Demo: http://jsfiddle.net/as1r9h44/