ngx-payvent-shared 0.0.5 → 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.
@@ -691,8 +691,8 @@ class SidebarService {
691
691
  openSidebar(component, data = null, options = {}) {
692
692
  let defaultPosition = 'bottom';
693
693
  if (window.innerWidth < 576) {
694
- document.getElementsByTagName("html")[0].style['overscroll-behavior'] = 'none';
695
- document.getElementsByTagName("body")[0].style['overscroll-behavior'] = 'none';
694
+ document.getElementsByTagName("html")[0].style['overflow'] = 'hidden';
695
+ document.getElementsByTagName("body")[0].style['overflow'] = 'hidden';
696
696
  defaultPosition = 'bottom';
697
697
  }
698
698
  options.position = options.position || defaultPosition;
@@ -761,12 +761,12 @@ class SidebarService {
761
761
  return s;
762
762
  closee.visible = false;
763
763
  if (s.findIndex(a => a.visible) < 0) {
764
- document.getElementsByTagName("html")[0].style['overscroll-behavior'] = 'initial';
765
- document.getElementsByTagName("body")[0].style['overscroll-behavior'] = 'initial';
764
+ document.getElementsByTagName("html")[0].style['overflow'] = 'initial';
765
+ document.getElementsByTagName("body")[0].style['overflow'] = 'initial';
766
766
  }
767
767
  return s;
768
768
  });
769
- timer(300).subscribe(er => {
769
+ timer(200).subscribe(er => {
770
770
  this.sidebars.update(s => {
771
771
  return s.filter(a => a.visible);
772
772
  ;
@@ -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 targetId = evt.target.id;
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;