@design.estate/dees-wcctools 1.0.99 → 1.0.101

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.
@@ -43573,6 +43573,8 @@ var WccDashboard2 = class extends DeesElement {
43573
43573
  this.warning = null;
43574
43574
  this.frameScrollY = 0;
43575
43575
  this.sidebarScrollY = 0;
43576
+ this.scrollPositionsApplied = false;
43577
+ this.scrollListenersAttached = false;
43576
43578
  if (elementsArg) {
43577
43579
  this.elements = elementsArg;
43578
43580
  console.log("got elements:");
@@ -43720,6 +43722,9 @@ var WccDashboard2 = class extends DeesElement {
43720
43722
  this.domtools.router.pushUrl(fullUrl);
43721
43723
  }
43722
43724
  async setupScrollListeners() {
43725
+ if (this.scrollListenersAttached) {
43726
+ return;
43727
+ }
43723
43728
  const wccFrame = await this.wccFrame;
43724
43729
  const wccSidebar = this.shadowRoot.querySelector("wcc-sidebar");
43725
43730
  if (wccFrame) {
@@ -43727,6 +43732,7 @@ var WccDashboard2 = class extends DeesElement {
43727
43732
  this.frameScrollY = wccFrame.scrollTop;
43728
43733
  this.debouncedScrollUpdate();
43729
43734
  });
43735
+ this.scrollListenersAttached = true;
43730
43736
  }
43731
43737
  if (wccSidebar) {
43732
43738
  wccSidebar.addEventListener("scroll", () => {
@@ -43755,6 +43761,9 @@ var WccDashboard2 = class extends DeesElement {
43755
43761
  window.history.replaceState(null, "", fullUrl);
43756
43762
  }
43757
43763
  async applyScrollPositions() {
43764
+ if (this.scrollPositionsApplied) {
43765
+ return;
43766
+ }
43758
43767
  const wccFrame = await this.wccFrame;
43759
43768
  const wccSidebar = this.shadowRoot.querySelector("wcc-sidebar");
43760
43769
  if (wccFrame && this.frameScrollY > 0) {
@@ -43763,6 +43772,7 @@ var WccDashboard2 = class extends DeesElement {
43763
43772
  if (wccSidebar && this.sidebarScrollY > 0) {
43764
43773
  wccSidebar.scrollTop = this.sidebarScrollY;
43765
43774
  }
43775
+ this.scrollPositionsApplied = true;
43766
43776
  }
43767
43777
  };
43768
43778
  __decorateClass([
@@ -43789,12 +43799,6 @@ __decorateClass([
43789
43799
  __decorateClass([
43790
43800
  n4()
43791
43801
  ], WccDashboard2.prototype, "warning", 2);
43792
- __decorateClass([
43793
- n4()
43794
- ], WccDashboard2.prototype, "frameScrollY", 2);
43795
- __decorateClass([
43796
- n4()
43797
- ], WccDashboard2.prototype, "sidebarScrollY", 2);
43798
43802
  __decorateClass([
43799
43803
  r6("wcc-frame")
43800
43804
  ], WccDashboard2.prototype, "wccFrame", 2);