Skip to content
Snippets Groups Projects
Commit 3935c5c5 authored by rhenck's avatar rhenck
Browse files

[editor] Select initial page

parent 07377eb8
No related branches found
No related tags found
No related merge requests found
import { Component } from '@angular/core'; import { Component } from '@angular/core';
import { Subject } from 'rxjs'; import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators'; import { takeUntil } from 'rxjs/operators';
import { UnitPage } from '../../../../../../../common/unit'; import { UnitPage, UnitUIElement } from '../../../../../../../common/unit';
import { SelectionService } from '../../../../selection.service'; import { SelectionService } from '../../../../selection.service';
@Component({ @Component({
...@@ -32,7 +32,11 @@ export class PropertiesComponent { ...@@ -32,7 +32,11 @@ export class PropertiesComponent {
}); });
this.selectionService.selectedElements this.selectionService.selectedElements
.pipe(takeUntil(this.ngUnsubscribe)) .pipe(takeUntil(this.ngUnsubscribe))
.subscribe(() => { this.expandElementView = true; }); .subscribe((elements: UnitUIElement[]) => {
if (elements.length > 0) {
this.expandElementView = true;
}
});
} }
ngOnDestroy(): void { ngOnDestroy(): void {
......
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