@eturnity/eturnity_reusable_components 7.4.4-EPDM-7260.3 → 7.4.4-EPDM-7260.4

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "7.4.4-EPDM-7260.3",
3
+ "version": "7.4.4-EPDM-7260.4",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -179,8 +179,8 @@ export default {
179
179
  this.parentWidth = parentWidth
180
180
  this.parentHeight = parentHeight
181
181
 
182
- this.left = this.min * this.stepCount
183
- this.right = this.max * this.stepCount
182
+ this.left = this.min * this.pxPerStep
183
+ this.right = this.max * this.pxPerStep
184
184
  this.width = computeWidth(this.left, this.right)
185
185
  this.height = this.h !== 'auto' ? this.h : parentHeight
186
186
 
@@ -467,7 +467,7 @@ export default {
467
467
  removeEvent(document.documentElement, eventsFor.move, this.handleResize)
468
468
  },
469
469
  roundToNearestStep(value) {
470
- const val = value / this.stepCount
470
+ const val = value / this.pxPerStep
471
471
 
472
472
  const int = 1.0 / this.step
473
473
  return (Math.floor(val * int) / int).toFixed(2)
@@ -490,8 +490,11 @@ export default {
490
490
 
491
491
  return this.handles
492
492
  },
493
+ pxPerStep() {
494
+ return this.parentWidth / this.stepCount
495
+ },
493
496
  minWidthByPx() {
494
- return this.minWidth * this.stepCount
497
+ return this.minWidth * this.pxPerStep
495
498
  },
496
499
  computedWidth() {
497
500
  if (this.width === 'auto') {
@@ -473,16 +473,6 @@ export default {
473
473
  // Remove the global click event listener to prevent memory leaks
474
474
  document.removeEventListener('click', this.handleOutsideClick)
475
475
  document.removeEventListener('keydown', this.onKeyDownDelete)
476
- },
477
- mounted() {
478
- // TODO: remove
479
- // this.tariffItems.forEach((item) => {
480
- // item.tariff_time_mfr.forEach((tariff) => {
481
- // tariff.time_to = '12:00:00'
482
- // tariff.time_up_to = '12:00:00'
483
- // })
484
- // })
485
- console.log('mounted tariffItems', this.tariffItems)
486
476
  }
487
477
  }
488
478
  </script>