fixed scroll top
This commit is contained in:
parent
d1d3e2b5bb
commit
edf71cc216
@ -64,8 +64,10 @@
|
||||
<div *ngFor="let key of filterKeys()">
|
||||
<div class="mat-menu-item flex" (click)="$event.stopPropagation()">
|
||||
<div class="arrow-wrapper" *ngIf="hasSubsections(filters[key])">
|
||||
<mat-icon *ngIf="expandedFilters[key]" (click)="setExpanded(key, false, $event)">arrow_drop_down</mat-icon>
|
||||
<mat-icon *ngIf="!expandedFilters[key]" (click)="setExpanded(key, true, $event)">arrow_right</mat-icon>
|
||||
<mat-icon *ngIf="expandedFilters[key]" (click)="setExpanded(key, false, $event)">arrow_drop_down
|
||||
</mat-icon>
|
||||
<mat-icon *ngIf="!expandedFilters[key]" (click)="setExpanded(key, true, $event)">arrow_right
|
||||
</mat-icon>
|
||||
</div>
|
||||
<mat-checkbox [checked]="isChecked(key)"
|
||||
[indeterminate]="isIndeterminate(key)"
|
||||
@ -104,7 +106,7 @@
|
||||
|
||||
<div class="annotations" #annotations>
|
||||
<div *ngFor="let page of displayedPages">
|
||||
<div class="page-separator">
|
||||
<div class="page-separator" attr.anotation-page-header="{{page}}">
|
||||
<span class="all-caps-label"><span translate="page"></span> {{page}}</span>
|
||||
</div>
|
||||
|
||||
|
||||
@ -205,7 +205,7 @@ export class FilePreviewScreenComponent implements OnInit {
|
||||
if (this.selectedAnnotation?.getPageNumber() === this.activeViewerPage) {
|
||||
return;
|
||||
}
|
||||
const elements: any[] = this._annotationsElement.nativeElement.querySelectorAll(`div[annotation-page="${this.activeViewerPage}"]`);
|
||||
const elements: any[] = this._annotationsElement.nativeElement.querySelectorAll(`div[anotation-page-header="${this.activeViewerPage}"]`);
|
||||
this._scrollToFirstElement(elements);
|
||||
}
|
||||
|
||||
@ -214,8 +214,8 @@ export class FilePreviewScreenComponent implements OnInit {
|
||||
scrollIntoView(elements[0], {
|
||||
behavior: 'smooth',
|
||||
scrollMode: 'if-needed',
|
||||
block: 'center',
|
||||
inline: 'center'
|
||||
block: 'start',
|
||||
inline: 'start'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user