Skip to content
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

Adding wrapper to template breaks functionality #655

Open
graphical-iain opened this issue Oct 9, 2018 · 1 comment
Open

Adding wrapper to template breaks functionality #655

graphical-iain opened this issue Oct 9, 2018 · 1 comment

Comments

@graphical-iain
Copy link

graphical-iain commented Oct 9, 2018

Steps to reproduce

  1. Wrap contents of rzslider with a div

Demo: fiddle doesn't allow for additional files, so I can't demo with a custom template.

Expected behaviour

A wrapper should do nothing to functionality.

Actual behaviour

A wrapper in the template should be benign. The JS should not be reliant on the structure, but on class names or variables.

With simple div wrapper inside rz-slider:
image

No wrapper:
image

Static design of what I am trying to achieve:
image

Edit: Updated wrapper screenshot to look better

@ValentinH
Copy link
Member

Hey, Yes I understand your issue.

The function responsible for this issue is this one: https://github.com/angular-slider/angularjs-slider/blob/master/src/rzslider.js#L666

I've never liked the way it was implemented and I agree that relying on classnames would be better.

Would you like to submit a PR for this?

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

2 participants