@eturnity/eturnity_reusable_components 7.4.4-EPDM-7260.5 → 7.4.4-EPDM-7260.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
@@ -3,14 +3,14 @@
|
|
3
3
|
:style="style"
|
4
4
|
:class="className"
|
5
5
|
@mousedown="elementMouseDown"
|
6
|
-
@
|
6
|
+
@touchend="elementTouchDown"
|
7
7
|
>
|
8
8
|
<div
|
9
9
|
v-for="handle in actualHandles"
|
10
10
|
:key="handle"
|
11
11
|
:style="{ display: enabled ? 'block' : 'none' }"
|
12
12
|
@mousedown.stop.prevent="handleDown(handle, $event)"
|
13
|
-
@
|
13
|
+
@touchend.stop.prevent="handleTouchDown(handle, $event)"
|
14
14
|
>
|
15
15
|
<slot :name="handle"></slot>
|
16
16
|
</div>
|
@@ -443,8 +443,6 @@ export default {
|
|
443
443
|
handleUp() {
|
444
444
|
this.handle = null
|
445
445
|
|
446
|
-
this.resetBoundsAndMouseState()
|
447
|
-
|
448
446
|
this.dragEnable = false
|
449
447
|
this.resizeEnable = false
|
450
448
|
|
@@ -470,7 +468,7 @@ export default {
|
|
470
468
|
const val = value / this.pxPerStep
|
471
469
|
|
472
470
|
const int = 1.0 / this.step
|
473
|
-
return (Math.
|
471
|
+
return (Math.round(val * int) / int).toFixed(2)
|
474
472
|
}
|
475
473
|
},
|
476
474
|
computed: {
|
@@ -242,9 +242,9 @@ const VerticalLabel = styled.div`
|
|
242
242
|
`
|
243
243
|
|
244
244
|
const HandleIcon = styled(Icon)`
|
245
|
-
width:
|
245
|
+
width: 12px;
|
246
246
|
min-width: 0;
|
247
|
-
margin: -
|
247
|
+
margin: -6px;
|
248
248
|
`
|
249
249
|
|
250
250
|
const BarOptionAttrs = { top: Number, left: Number }
|
@@ -375,12 +375,16 @@ export default {
|
|
375
375
|
},
|
376
376
|
checkOverlap(value, tariffs) {
|
377
377
|
// Check if the tariffs overlap
|
378
|
-
const { itemId
|
378
|
+
const { itemId } = value
|
379
|
+
const min = parseFloat(value.min)
|
380
|
+
const max = parseFloat(value.max)
|
379
381
|
|
380
382
|
return tariffs.some((tariff) => {
|
381
383
|
if (tariff.id === itemId) return false
|
382
384
|
|
383
385
|
return (
|
386
|
+
(min === tariff.min ) ||
|
387
|
+
(max === tariff.max) ||
|
384
388
|
(min > tariff.min && min < tariff.max) ||
|
385
389
|
(max > tariff.min && max < tariff.max) ||
|
386
390
|
(min < tariff.min && max > tariff.max)
|
@@ -421,6 +425,8 @@ export default {
|
|
421
425
|
item,
|
422
426
|
label: this.activeLabel
|
423
427
|
})
|
428
|
+
|
429
|
+
this.hasOverlap = this.checkOverlap(item, this.activeLabel.selectedTariffs)
|
424
430
|
this.showBarOptions = false
|
425
431
|
},
|
426
432
|
setBarOptions(bar) {
|