Skip to content

Add a rzSliderShowTicks #68

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

Merged
merged 3 commits into from
Oct 2, 2015
Merged

Add a rzSliderShowTicks #68

merged 3 commits into from
Oct 2, 2015

Conversation

ValentinH
Copy link
Member

<rzslider rz-slider-model="priceSlider" rz-slider-show-ticks="true"></rzslider>

It displays a tick for each possible value. See the Example on the demo page or on this fiddle.

@soee
Copy link

soee commented Sep 3, 2015

I'm not using it atm. but it is a nice feature, so: +1

@adgoncal
Copy link

adgoncal commented Sep 9, 2015

It is a good idea, but I was trying it out on the fiddle and when there are ticks, you can no longer click on the timeline bar and have the handle move to that point. However, clicking above the tick still works.

Also, is a table really the best option for displaying ticks?

@ValentinH
Copy link
Member Author

Indeed the ticks should be under the bar that's why. I'll rebase it and fix it.

About the table, why not?

@adgoncal
Copy link

adgoncal commented Sep 9, 2015

I just thought there may be a better approach because it is not tabular data.
But it is simple and it works, so I guess it should be fine.

@ValentinH
Copy link
Member Author

Actually, the trick with the table is that you don't need to specify each tick's position. Just give the total width and they will be equally spread.

@ValentinH
Copy link
Member Author

@adgoncal rebased so now the ticks are under the bar.

@adgoncal
Copy link

Cool!

@ValentinH
Copy link
Member Author

Actually, the limit with the current table method is that if you want to draw circle as ticks, it is not possible. Indeed, it's using td borders...

@ValentinH
Copy link
Member Author

I have replaced the table method by a method with ul displayed with flex. Now you can use whatever you want for the ticks: even circles ;)

See http://jsfiddle.net/ngrq2kdm/

ValentinH added a commit that referenced this pull request Oct 2, 2015
Add a rzSliderShowTicks and rzSliderShowTicksValue
@ValentinH ValentinH merged commit 00b6b29 into angular-slider:master Oct 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants