Merge pull request #5617 from tsiegleauq/only-non-stable-slides-in-ap
Show first unstable element in autopilot
This commit is contained in:
commit
58db337a40
@ -95,6 +95,18 @@ export class Projector extends BaseModel<Projector> {
|
|||||||
return [this.aspect_ratio_numerator, this.aspect_ratio_denominator].join(':');
|
return [this.aspect_ratio_numerator, this.aspect_ratio_denominator].join(':');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get firstUnstableElement(): ProjectorElement {
|
||||||
|
let elementIndex = 0;
|
||||||
|
/**
|
||||||
|
* while we could use a filter function to remove all stable elements, I expect
|
||||||
|
* this approach to be the fastest
|
||||||
|
*/
|
||||||
|
while (!!this.elements[elementIndex]?.stable) {
|
||||||
|
elementIndex++;
|
||||||
|
}
|
||||||
|
return this.elements[elementIndex] ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the aspect ratio
|
* Set the aspect ratio
|
||||||
*/
|
*/
|
||||||
|
@ -96,7 +96,7 @@ export class CinemaComponent extends BaseViewComponentDirective implements OnIni
|
|||||||
this.subscriptions.push(
|
this.subscriptions.push(
|
||||||
this.projectorRepo.getReferenceProjectorObservable().subscribe(refProjector => {
|
this.projectorRepo.getReferenceProjectorObservable().subscribe(refProjector => {
|
||||||
this.projector = refProjector;
|
this.projector = refProjector;
|
||||||
this.currentProjectorElement = refProjector?.elements[0] || null;
|
this.currentProjectorElement = refProjector?.firstUnstableElement || null;
|
||||||
if (this.currentProjectorElement) {
|
if (this.currentProjectorElement) {
|
||||||
this.projectedViewModel = this.projectorService.getViewModelFromProjectorElement(
|
this.projectedViewModel = this.projectorService.getViewModelFromProjectorElement(
|
||||||
this.currentProjectorElement
|
this.currentProjectorElement
|
||||||
|
Loading…
Reference in New Issue
Block a user