Skip to content
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.

Possibility to set custom label #133

Open
eximius313 opened this issue May 12, 2016 · 1 comment
Open

Possibility to set custom label #133

eximius313 opened this issue May 12, 2016 · 1 comment

Comments

@eximius313
Copy link

Description

I want to represent percentage values using paper-slider. Unfortunately pin displays only the number which confuses users. It would be great to set custom label after the number (e.g. "%" or "$")

Expected outcome

<paper-slider custom-label="%"></paper-slider>

Actual outcome

It is not possible to set custom label

Live Demo

N/A

Steps to reproduce

N/A

Browsers Affected

N/A

@keanulee
Copy link
Contributor

That's a cool feature request. For anyone who wants to try to implement this, I would suggest making the value attribute of div#sliderKnobInner be computed from a new label property on paper-slider:

<div id="sliderKnobInner" value$="[[_getPinLabel(immediateValue, label)]]"></div>

But the label may come before (e.g. "$") or after (e.g. "%") the value, so there may need to be more new properties. Also need to make sure that the string still fits inside the pin.

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

No branches or pull requests

2 participants