ngx-payvent-shared 0.0.6 → 0.0.7
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.
|
@@ -2411,10 +2411,16 @@ class SidebarComponent {
|
|
|
2411
2411
|
this.sidebarService.closeSidebar(id);
|
|
2412
2412
|
}
|
|
2413
2413
|
onPan(evt, id) {
|
|
2414
|
-
console.log(evt);
|
|
2415
2414
|
switch (evt.type) {
|
|
2416
2415
|
case 'touchstart':
|
|
2417
|
-
let
|
|
2416
|
+
let target = evt.target;
|
|
2417
|
+
// while(target){
|
|
2418
|
+
// if(target.scrollTop>0 && this.#deltaScroll < 0)
|
|
2419
|
+
// return;
|
|
2420
|
+
// if(target.scrollTop + target.clientHeight > target.scrollHeight && this.#deltaScroll > 0)
|
|
2421
|
+
// return;
|
|
2422
|
+
// target = target.parentElement;
|
|
2423
|
+
// }
|
|
2418
2424
|
this.panElement = document.querySelector(`#sidebar-${id}`);
|
|
2419
2425
|
this.panElement.style.transition = 'none';
|
|
2420
2426
|
this.initialHeight = this.panElement.offsetHeight;
|
|
@@ -2425,6 +2431,18 @@ class SidebarComponent {
|
|
|
2425
2431
|
if (!this.panElement)
|
|
2426
2432
|
return;
|
|
2427
2433
|
this.#deltaScroll = this.#initialY - evt.touches[0].clientY;
|
|
2434
|
+
let target2 = evt.target;
|
|
2435
|
+
while (target2) {
|
|
2436
|
+
if (target2.scrollTop > 0 && this.#deltaScroll < 0) {
|
|
2437
|
+
this.#initialY = evt.touches[0].clientY;
|
|
2438
|
+
return;
|
|
2439
|
+
}
|
|
2440
|
+
if (target2.scrollTop > 0 && target2.scrollTop + target2.clientHeight < target2.scrollHeight && this.#deltaScroll > 0) {
|
|
2441
|
+
this.#initialY = evt.touches[0].clientY;
|
|
2442
|
+
return;
|
|
2443
|
+
}
|
|
2444
|
+
target2 = target2.parentElement;
|
|
2445
|
+
}
|
|
2428
2446
|
if (this.#deltaScroll < 0 && this.contentComponent.nativeElement.scrollTop > 0) {
|
|
2429
2447
|
this.panElement = null;
|
|
2430
2448
|
return;
|