-
-
Notifications
You must be signed in to change notification settings - Fork 496
Generic translate #161
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
Comments
I'm not sure to understand what you want:
|
Hi there, thanks for answering so quickly! It would be one translate function for all of a given set of sliders which knows the control that is making the call. Currently I can assign a function per slider using the parameters available but that only passes into the resultant function a value element so I have to declare one function per slider. Is there a more generic way of doing this? Regards |
Currently this is not possible. The fastest way for you can be to create a wrapping function for each slider which pass it the value + an ID... I'm currently working on a refactoring (see the Readme) of this directive where I'm changing the way to pass the options. I could add something in it to handle your need. |
That would be excellent. Just an id along with the value for translate would open up possibilities for code re-use. I did think after looking at the changes you were envisioning that it would possibly fit with that since you are aiming for more code configuration. thanks |
Would it be an idea to add this to the other function callbacks (onStart, onChange and onEnd) aswell? |
When adding it to the translate function I actually hesitate to add them to the callbacks as well. I didn't do it but it its totally feasible if needed. |
Personally I'd love it if you could add it to the other callbacks as well. Seeing as you promote re-use I think it would be a good step for the slider in general. |
Love the idea of an event. I took your advice in the end and wrapped in a On Monday, 2 November 2015, Peter Ton notifications@github.com wrote:
Our new children's pirate book available on iTunes - |
Added to master. |
Thank you :-) |
I want to use this slider in my project and have a dynamically created number of sliders.
At the moment, the translate function seems to have to be done once per slider with each function call on the state or vm.
Is there something I have missed about being able to get an id of the slider asking to make the translation or something I have missed in the documentation so I can use a more generic function? Ideally, I want to wrap this in a small additional directive to help with setting the values and styles I need.
Thanks
Jon
The text was updated successfully, but these errors were encountered: