Skip to content
Snippets Groups Projects
Commit 57ad4b6e authored by jojohoch's avatar jojohoch
Browse files

[player] Change the registration with the UnitStateService

Since CompoundElementComponent now inherits from ElementComponent,
a case distinction can no longer be made implicitly via the property
domElement.
parent a418ac8d
No related branches found
No related tags found
No related merge requests found
...@@ -113,7 +113,7 @@ export class ElementContainerComponent implements OnInit { ...@@ -113,7 +113,7 @@ export class ElementContainerComponent implements OnInit {
} }
private registerAtUnitStateService(elementComponent: any): void { private registerAtUnitStateService(elementComponent: any): void {
if (elementComponent.domElement) { if (!(elementComponent instanceof CompoundElementComponent)) {
this.unitStateService.registerElement( this.unitStateService.registerElement(
this.initUnitStateValue(elementComponent.elementModel), this.initUnitStateValue(elementComponent.elementModel),
elementComponent.domElement, elementComponent.domElement,
...@@ -128,13 +128,11 @@ export class ElementContainerComponent implements OnInit { ...@@ -128,13 +128,11 @@ export class ElementContainerComponent implements OnInit {
.pipe(takeUntil(this.ngUnsubscribe)) .pipe(takeUntil(this.ngUnsubscribe))
.subscribe((children: QueryList<ElementComponent>) => { .subscribe((children: QueryList<ElementComponent>) => {
children.forEach(child => { children.forEach(child => {
if (child.domElement) { this.unitStateService.registerElement(
this.unitStateService.registerElement( this.initUnitStateValue(child.elementModel),
this.initUnitStateValue(child.elementModel), child.domElement,
child.domElement, this.pageIndex
this.pageIndex );
);
}
}); });
}); });
} }
......
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