@d-i-t-a/reader 2.0.0-beta.15 → 2.0.0-beta.16

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/dist/esm/index.js CHANGED
@@ -59736,10 +59736,12 @@ var LineFocusModule = class {
59736
59736
  const wrapper = findRequiredElement(document, "#iframe-wrapper");
59737
59737
  if (wrapper.style.height.length > 0) {
59738
59738
  this.wrapperHeight = wrapper.style.height;
59739
- if (this.lineFocusContainer)
59739
+ if (this.lineFocusContainer && this.lineFocusContainer.style.height.length == 0)
59740
59740
  this.lineFocusContainer.style.height = this.wrapperHeight;
59741
- if (this.readerContainer) {
59741
+ if (this.readerContainer && this.readerContainer.style.height.length == 0) {
59742
59742
  this.readerContainer.style.height = this.wrapperHeight;
59743
+ }
59744
+ if (this.readerContainer) {
59743
59745
  this.readerContainer.style.overflow = "hidden";
59744
59746
  }
59745
59747
  }
@@ -59750,13 +59752,6 @@ var LineFocusModule = class {
59750
59752
  }
59751
59753
  }
59752
59754
  async enableLineFocus() {
59753
- if (!this.isActive) {
59754
- const wrapper = findRequiredElement(document, "#iframe-wrapper");
59755
- if (wrapper.style.height.length > 0) {
59756
- this.wrapperHeight = wrapper.style.height;
59757
- }
59758
- wrapper.style.height = "100vh";
59759
- }
59760
59755
  this.isActive = true;
59761
59756
  await this.delegate.settings.scroll(true);
59762
59757
  this.lineFocus();
@@ -59767,8 +59762,12 @@ var LineFocusModule = class {
59767
59762
  if (this.wrapperHeight) {
59768
59763
  wrapper.style.height = this.wrapperHeight;
59769
59764
  } else if (resetHeight) {
59765
+ this.index = 0;
59770
59766
  wrapper.style.removeProperty("height");
59771
59767
  }
59768
+ if (!resetHeight) {
59769
+ this.index = 0;
59770
+ }
59772
59771
  const doc = this.delegate.iframes[0].contentDocument;
59773
59772
  const html = findIframeElement(doc, "html");
59774
59773
  html.style.removeProperty("--USER__maxMediaHeight");