aeb-ui-kit 3.0.0-preview.565 → 3.0.0-preview.571
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/fesm2020/aeb-ui-kit.mjs
CHANGED
|
@@ -4425,7 +4425,9 @@ class SliderComponent {
|
|
|
4425
4425
|
}
|
|
4426
4426
|
};
|
|
4427
4427
|
this.handleStartSwiping = (event) => {
|
|
4428
|
-
event.
|
|
4428
|
+
if (event.cancelable) {
|
|
4429
|
+
event.preventDefault();
|
|
4430
|
+
}
|
|
4429
4431
|
if (event.touches && event.touches.length) {
|
|
4430
4432
|
const finger = event.touches[0];
|
|
4431
4433
|
this.handleChangeValue(finger.clientX);
|
|
@@ -4438,7 +4440,9 @@ class SliderComponent {
|
|
|
4438
4440
|
document.removeEventListener('mouseup', this.handleEndDragging);
|
|
4439
4441
|
};
|
|
4440
4442
|
this.handleEndSwiping = (event) => {
|
|
4441
|
-
event.
|
|
4443
|
+
if (event.cancelable) {
|
|
4444
|
+
event.preventDefault();
|
|
4445
|
+
}
|
|
4442
4446
|
this.isPressed = false;
|
|
4443
4447
|
document.removeEventListener('touchmove', this.handleStartSwiping);
|
|
4444
4448
|
document.removeEventListener('touchend', this.handleEndSwiping);
|
|
@@ -4474,7 +4478,9 @@ class SliderComponent {
|
|
|
4474
4478
|
registerOnTouched() { }
|
|
4475
4479
|
ngAfterViewInit() {
|
|
4476
4480
|
this.renderer.listen(this.slider.nativeElement, 'touchstart', (event) => {
|
|
4477
|
-
event.
|
|
4481
|
+
if (event.cancelable) {
|
|
4482
|
+
event.preventDefault();
|
|
4483
|
+
}
|
|
4478
4484
|
this.handleStartSwiping(event);
|
|
4479
4485
|
document.addEventListener('touchmove', this.handleStartSwiping, {
|
|
4480
4486
|
passive: false
|
|
@@ -4500,6 +4506,9 @@ class SliderComponent {
|
|
|
4500
4506
|
else if (this.value > this.max) {
|
|
4501
4507
|
this.value = this.max;
|
|
4502
4508
|
}
|
|
4509
|
+
if (typeof this.onChange === 'function') {
|
|
4510
|
+
this.onChange(this.value);
|
|
4511
|
+
}
|
|
4503
4512
|
}
|
|
4504
4513
|
calculateAverage(values) {
|
|
4505
4514
|
return values.reduce((sum, value) => sum + value, 0) / values.length;
|