Fix slide container margin
This commit is contained in:
parent
9e2d42f9f4
commit
7dee5acc7e
@ -16,7 +16,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngFor="let slide of slides">
|
<div *ngFor="let slide of slides">
|
||||||
<os-slide-container [slideData]="slide" [scroll]="scroll" [scale]="scale"></os-slide-container>
|
<os-slide-container [slideData]="slide" [scroll]="scroll" [scale]="scale" [headerEnabled]="projector.show_header_footer"></os-slide-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="footer" [ngStyle]="headerFooterStyle" *ngIf="projector && projector.show_header_footer">
|
<div id="footer" [ngStyle]="headerFooterStyle" *ngIf="projector && projector.show_header_footer">
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
width: calc(100% - 100px);
|
width: calc(100% - 100px);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 50px;
|
left: 50px;
|
||||||
top: 100px;
|
top: 50px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ import { TranslateService } from '@ngx-translate/core';
|
|||||||
import { BaseComponent } from 'app/base.component';
|
import { BaseComponent } from 'app/base.component';
|
||||||
import { SlideManager } from 'app/slides/services/slide-manager.service';
|
import { SlideManager } from 'app/slides/services/slide-manager.service';
|
||||||
import { BaseSlideComponent } from 'app/slides/base-slide-component';
|
import { BaseSlideComponent } from 'app/slides/base-slide-component';
|
||||||
import { ConfigService } from 'app/core/ui-services/config.service';
|
|
||||||
import { SlideData } from 'app/site/projector/services/projector-data.service';
|
import { SlideData } from 'app/site/projector/services/projector-data.service';
|
||||||
import { ProjectorElement } from 'app/shared/models/core/projector';
|
import { ProjectorElement } from 'app/shared/models/core/projector';
|
||||||
|
|
||||||
@ -63,6 +62,12 @@ export class SlideContainerComponent extends BaseComponent {
|
|||||||
this.setDataForComponent();
|
this.setDataForComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Variable, if the projector header is enabled.
|
||||||
|
*/
|
||||||
|
@Input()
|
||||||
|
public headerEnabled: boolean;
|
||||||
|
|
||||||
public get slideData(): SlideData<object> {
|
public get slideData(): SlideData<object> {
|
||||||
return this._slideData;
|
return this._slideData;
|
||||||
}
|
}
|
||||||
@ -105,25 +110,11 @@ export class SlideContainerComponent extends BaseComponent {
|
|||||||
*/
|
*/
|
||||||
public slideStyle: { 'font-size': string; 'margin-top': string } = {
|
public slideStyle: { 'font-size': string; 'margin-top': string } = {
|
||||||
'font-size': '100%',
|
'font-size': '100%',
|
||||||
'margin-top': '100px'
|
'margin-top': '50px'
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
public constructor(titleService: Title, translate: TranslateService, private slideManager: SlideManager) {
|
||||||
* Variable, if the projector header is enabled.
|
|
||||||
*/
|
|
||||||
private headerEnabled = true;
|
|
||||||
|
|
||||||
public constructor(
|
|
||||||
titleService: Title,
|
|
||||||
translate: TranslateService,
|
|
||||||
private slideManager: SlideManager,
|
|
||||||
private configService: ConfigService
|
|
||||||
) {
|
|
||||||
super(titleService, translate);
|
super(titleService, translate);
|
||||||
|
|
||||||
this.configService.get<boolean>('projector_enable_header_footer').subscribe(val => {
|
|
||||||
this.headerEnabled = val;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -134,7 +125,7 @@ export class SlideContainerComponent extends BaseComponent {
|
|||||||
let value = this._scroll;
|
let value = this._scroll;
|
||||||
value *= -50;
|
value *= -50;
|
||||||
if (this.headerEnabled) {
|
if (this.headerEnabled) {
|
||||||
value += 100; // Default offset for the header
|
value += 50; // Default offset for the header
|
||||||
}
|
}
|
||||||
this.slideStyle['margin-top'] = `${value}px`;
|
this.slideStyle['margin-top'] = `${value}px`;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user