paper-slider icon indicating copy to clipboard operation
paper-slider copied to clipboard

Added pinLabel property.

Open Inrego opened this issue 8 years ago • 2 comments

Solves https://github.com/PolymerElements/paper-slider/issues/133 although with a little more customization than suggested there.

I've added an optional pinLabel property that if set, will be used for the pin label instead of just the immediateValue. That way, you can create your own text with bindings, like so:

immediate-value="{{durationSliderValue}}" pin-label="[[_readableDuration(durationSliderValue)]]"

If not set, the value will be used as normal, so no breaking changes.

Inrego avatar Jan 19 '17 11:01 Inrego

Well it does offer a solution to that issue. I implemented this because I had a problem where I needed to format the numbers into a timestamp instead of showing just a number, since I use this slider as a slider to seek in a video. This offers a way to support both. The text does get a little cramped in there, though so people will have to keep that in mind when making labels, that they should be rather short. Unless someone can make the pin dynamic size or something like that.

Inrego avatar Jan 19 '17 19:01 Inrego

Since this is a new feature, tt'd be great to add a demo and a test.

keanulee avatar Jan 30 '17 22:01 keanulee