@eric-emg/symphiq-components 1.2.107 → 1.2.109
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/fesm2022/symphiq-components.mjs +8 -13
- package/fesm2022/symphiq-components.mjs.map +1 -1
- package/index.d.ts +59 -59
- package/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -24149,12 +24149,7 @@ class FloatingTocComponent {
|
|
|
24149
24149
|
scrollToSection(sectionId) {
|
|
24150
24150
|
const element = document.getElementById(`section-${sectionId}`);
|
|
24151
24151
|
if (element) {
|
|
24152
|
-
|
|
24153
|
-
const offsetPosition = elementPosition - this.HEADER_OFFSET;
|
|
24154
|
-
window.scrollTo({
|
|
24155
|
-
top: offsetPosition,
|
|
24156
|
-
behavior: 'smooth'
|
|
24157
|
-
});
|
|
24152
|
+
element.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
24158
24153
|
}
|
|
24159
24154
|
if (!this.isPinned()) {
|
|
24160
24155
|
this.isHovered.set(false);
|
|
@@ -24163,19 +24158,19 @@ class FloatingTocComponent {
|
|
|
24163
24158
|
scrollToSubsection(subsectionId) {
|
|
24164
24159
|
const element = document.getElementById(`subsection-${subsectionId}`);
|
|
24165
24160
|
if (element) {
|
|
24166
|
-
|
|
24167
|
-
const offsetPosition = elementPosition - this.HEADER_OFFSET;
|
|
24168
|
-
window.scrollTo({
|
|
24169
|
-
top: offsetPosition,
|
|
24170
|
-
behavior: 'smooth'
|
|
24171
|
-
});
|
|
24161
|
+
element.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
|
24172
24162
|
}
|
|
24173
24163
|
if (!this.isPinned()) {
|
|
24174
24164
|
this.isHovered.set(false);
|
|
24175
24165
|
}
|
|
24176
24166
|
}
|
|
24177
24167
|
scrollToTop() {
|
|
24178
|
-
|
|
24168
|
+
if (this.embedded && this.scrollElement) {
|
|
24169
|
+
this.scrollElement.scrollTo({ top: 0, behavior: 'smooth' });
|
|
24170
|
+
}
|
|
24171
|
+
else {
|
|
24172
|
+
window.scrollTo({ top: 0, behavior: 'smooth' });
|
|
24173
|
+
}
|
|
24179
24174
|
if (!this.isPinned()) {
|
|
24180
24175
|
this.isHovered.set(false);
|
|
24181
24176
|
}
|