@kizmann/nano-ui 0.7.18 → 0.7.21
Sign up to get free protection for your applications and to get access to all the features.
- package/demos/overview.html +1 -1
- package/dist/nano-ui.js +1 -1
- package/dist/nano-ui.js.map +1 -1
- package/package.json +1 -1
- package/src/slider/src/slider/slider.js +6 -4
package/package.json
CHANGED
@@ -186,7 +186,7 @@ export default {
|
|
186
186
|
|
187
187
|
getValPos(value)
|
188
188
|
{
|
189
|
-
return Num.fixed(this.width / this.minmax * value, 2) + 'px';
|
189
|
+
return Num.fixed(this.width / this.minmax * (value - this.fixmin), 2) + 'px';
|
190
190
|
},
|
191
191
|
|
192
192
|
getValStyle(value)
|
@@ -196,7 +196,7 @@ export default {
|
|
196
196
|
|
197
197
|
getBarPos()
|
198
198
|
{
|
199
|
-
return Num.fixed(this.width / this.minmax * this.tempValue[0], 2) + 'px';
|
199
|
+
return Num.fixed(this.width / this.minmax * (this.tempValue[0] - this.fixmin), 2) + 'px';
|
200
200
|
},
|
201
201
|
|
202
202
|
getBarWidth()
|
@@ -220,7 +220,7 @@ export default {
|
|
220
220
|
Arr.first(this.steps);
|
221
221
|
|
222
222
|
let diff = Arr.each(this.steps, (step) => {
|
223
|
-
return Math.abs((range / 100 * width) - step);
|
223
|
+
return Math.abs((range / 100 * width) - step + this.fixmin);
|
224
224
|
});
|
225
225
|
|
226
226
|
let index = Arr.findIndex(diff, Math.min(...diff));
|
@@ -318,9 +318,11 @@ export default {
|
|
318
318
|
this.onMousedown(event, this.index = index);
|
319
319
|
};
|
320
320
|
|
321
|
+
let key = Arr.findIndex(this.steps, value);
|
322
|
+
|
321
323
|
return (
|
322
324
|
<div class="n-slider__handle" {...handleProps}>
|
323
|
-
<span>{ Obj.get(this.labels,
|
325
|
+
<span>{ Obj.get(this.labels, key, value) }</span>
|
324
326
|
</div>
|
325
327
|
);
|
326
328
|
},
|