Merge remote-tracking branch 'origin/develop' into stats-profile
This commit is contained in:
commit
2d01e7f945
|
@ -98,9 +98,15 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
|
||||
ngAfterViewInit() {
|
||||
if (typeof document !== "undefined") {
|
||||
if (this.sticky_footer) {
|
||||
this.initFooter();
|
||||
this.observeStickyFooter();
|
||||
}
|
||||
if (this.shouldSticky && typeof document !== 'undefined') {
|
||||
this.initHeader();
|
||||
this.observeStickyHeader();
|
||||
setTimeout(() => {
|
||||
this.sticky.header = UIkit.sticky((this.headerSticky ? this.header.nativeElement : this.actions.nativeElement), {
|
||||
offset: this.offset
|
||||
});
|
||||
this.subscriptions.push(UIkit.util.on(document, 'active', '#' + this.sticky.header.$el.id, () => {
|
||||
this.isStickyActive = true;
|
||||
this.cdr.detectChanges();
|
||||
|
@ -109,11 +115,7 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
this.isStickyActive = false;
|
||||
this.cdr.detectChanges();
|
||||
}));
|
||||
}
|
||||
if (this.sticky_footer) {
|
||||
let footer_offset = this.calcStickyFooterOffset(this.sticky_footer.nativeElement);
|
||||
this.sticky.footer = UIkit.sticky(this.sticky_footer.nativeElement, {bottom: true, offset: footer_offset});
|
||||
this.observeStickyFooter();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -128,13 +130,6 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
});
|
||||
}
|
||||
|
||||
initHeader() {
|
||||
this.sticky.header = UIkit.sticky((this.headerSticky ? this.header.nativeElement : this.actions.nativeElement), {
|
||||
offset: this.offset
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
initFooter() {
|
||||
let footer_offset = this.calcStickyFooterOffset(this.sticky_footer.nativeElement);
|
||||
this.sticky.footer = UIkit.sticky(this.sticky_footer.nativeElement, {bottom: true, offset: footer_offset});
|
||||
|
@ -210,18 +205,6 @@ export class PageContentComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
}
|
||||
}
|
||||
|
||||
private observeStickyHeader() {
|
||||
if (this.sticky.header) {
|
||||
let resizeObs= new ResizeObserver(entries => {
|
||||
entries.forEach(entry => {
|
||||
this.initHeader();
|
||||
})
|
||||
});
|
||||
this.subscriptions.push(resizeObs);
|
||||
resizeObs.observe(this.sticky.header.$el);
|
||||
}
|
||||
}
|
||||
|
||||
private observeStickyFooter() {
|
||||
if (this.sticky_footer) {
|
||||
let resizeObs = new ResizeObserver(entries => {
|
||||
|
|
|
@ -49,7 +49,9 @@ export class SideBarComponent implements OnInit, AfterViewInit, OnDestroy, OnCha
|
|||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
setTimeout(() => {
|
||||
this.toggle(true);
|
||||
});
|
||||
}
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
.uk-width-medium {
|
||||
width: 350px;
|
||||
}
|
|
@ -50,7 +50,7 @@ declare var ResizeObserver;
|
|||
</div>
|
||||
<div class="uk-section uk-container uk-container-large" uk-scrollspy-class>
|
||||
<div id="parentContainer" class="uk-grid uk-grid-large" uk-grid>
|
||||
<div class="uk-width-1-4 uk-margin-top">
|
||||
<div class="uk-width-medium uk-margin-top">
|
||||
<div class="uk-sticky" uk-sticky="bottom: !#parentContainer; offset: 100;">
|
||||
<slider-tabs type="scrollable" position="left">
|
||||
<slider-tab tabId="entities" tabTitle="1. Entities"></slider-tab>
|
||||
|
@ -116,7 +116,8 @@ declare var ResizeObserver;
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
`,
|
||||
styleUrls: ['terminology.component.less']
|
||||
})
|
||||
export class TerminologyComponent implements OnInit, OnDestroy, AfterViewInit, AfterContentChecked {
|
||||
public tab: 'entities' | 'attributes' = 'entities';
|
||||
|
|
Loading…
Reference in New Issue