Skip to content

slideEnded event: not possible to get the rzslider html element #86

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

Closed
mpluess opened this issue Jul 22, 2015 · 5 comments
Closed

slideEnded event: not possible to get the rzslider html element #86

mpluess opened this issue Jul 22, 2015 · 5 comments

Comments

@mpluess
Copy link

mpluess commented Jul 22, 2015

There seems to be no possibility to get the rzslider html element when reacting on a slideEnded event. The event variable does not contain any useful information about the slider element.
I wanted to change the opacity of the slider when a user moves a specific slider. Here's my workaround: I changed the $emit of this event from:
Original code: this.scope.$emit("slideEnded")
to:
Updated code: this.scope.$emit("slideEnded", this)

In my eventhandling function I am now able to get the id of the slider element like this:
$scope.$on("slideEnded", function(event, args) {
var compositeSliderId = args.attributes.id;
...
});

Question: Is there another possibility to do this that I overlooked? If no, do you think it's feasible to integrate my workaround?

@mpluess
Copy link
Author

mpluess commented Jul 22, 2015

On a sidenote: emitting a slideStarted event would be nice too, just for completion's sake.

@radek-anuszewski
Copy link

Hi @festivalhopper, to achevie this, merge rzSliderOnChange attribute by @ValentinH could be helpful.

OnChange, for example, $scope,currencyValueSliderTouched could be set to true. If you find it useful, please vote in rzSliderOnChange attribute for merge :)

@adambarthelson
Copy link

+1

@ValentinH
Copy link
Member

There is now a on-start and on-end callback that can be used as the on-change one. ;)

@mpluess
Copy link
Author

mpluess commented Oct 23, 2015

that's great, thank you, will check it out next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants