Skip to content
Snippets Groups Projects
Commit 9fbe479b authored by jojohoch's avatar jojohoch
Browse files

[player] Fix scrolling of hidden sections with different delays

parent 7a146546
No related branches found
No related tags found
No related merge requests found
Pipeline #42825 passed
Editor
======
##1.35.2
## 1.35.3
## 1.35.2
### Verbesserungen
- Wendet die Eigenschaft "Schreibgeschützt" auf Formel Elemente an
- Auswahllisten, die nur ein Element zulassen, werden von diesem Element komplett ausgefüllt
......
Player
======
## 1.28.3
### Fehlerbehebungen
- Korrigiert das Scroll-Verhalten von versteckten Abschnitten mit unterschiedlichen Verzögerungen
## 1.28.2
### Verbesserungen
......
......@@ -22,7 +22,8 @@ export class SectionVisibilityHandlingDirective {
this.isScrollSection = this.isVisible ?
false :
this.pageSections
.filter(pageSection => pageSection.activeAfterID === this.section.activeAfterID)
.filter(pageSection => pageSection.activeAfterID === this.section.activeAfterID &&
pageSection.activeAfterIdDelay === this.section.activeAfterIdDelay)
.findIndex(section => section === this.section) === 0;
if (this.mediaStatusChanged) {
......@@ -38,8 +39,10 @@ export class SectionVisibilityHandlingDirective {
if (!this.isVisible) {
this.setVisibility(id === this.section.activeAfterID);
if (this.isScrollSection) {
this.elementRef.nativeElement.style.scrollMargin = `${window.innerHeight / 3}px`;
this.elementRef.nativeElement.scrollIntoView({ behavior: 'smooth', block: 'start' });
this.elementRef.nativeElement.style.scrollMarginTop = 100;
setTimeout(() => {
this.elementRef.nativeElement.scrollIntoView({ behavior: 'smooth', block: 'start' });
});
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment