Skip to content

Commit d963e00

Browse files
committed
change the values on labelUp to be min/max for first/last
resolves #126
1 parent aa94dcb commit d963e00

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/RangePips.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@
206206
class:in-range={inRange(min)}
207207
style="{orientationStart}: 0%;"
208208
on:pointerdown={(e)=>{labelDown(e)}}
209-
on:pointerup={(e)=>{labelUp(pipVal(min),e)}}
209+
on:pointerup={(e)=>{labelUp(min,e)}}
210210
>
211211
{#if all === 'label' || first === 'label'}
212212
<span class="pipVal">
@@ -244,7 +244,7 @@
244244
class:in-range={inRange(max)}
245245
style="{orientationStart}: 100%;"
246246
on:pointerdown={(e)=>{labelDown(e)}}
247-
on:pointerup={(e)=>{labelUp(pipVal(max),e)}}
247+
on:pointerup={(e)=>{labelUp(max,e)}}
248248
>
249249
{#if all === 'label' || last === 'label'}
250250
<span class="pipVal">

test/src/App.svelte

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,10 @@
263263
<RangeSlider bind:values={decimals2} float pips all="label" min={-0.01} max={0.01} step={0.0005} precision={5} {reversed} {hoverable} {disabled} />
264264
{decimals2}<br>
265265

266+
<h2>Irregular start/end numbers</h2>
267+
<RangeSlider values={[30,130]} float pips all="label" hoverable range min={20} max={130} pipstep={3} step={5} />
268+
<RangeSlider values={[30,130]} float pips all="label" hoverable range min={30} max={130} pipstep={1} step={1} />
269+
266270
<h2>Aria Labels</h2>
267271
<p>Inspect the Dom to see the labels</p>
268272
<RangeSlider ariaLabels="ab" values={[5,20]} {reversed} {hoverable} {disabled} />

0 commit comments

Comments
 (0)