diff --git a/projects/editor/src/app/components/unit-view/page-view/properties/properties.component.ts b/projects/editor/src/app/components/unit-view/page-view/properties/properties.component.ts index d5eadc74369f971317695bf572c533ceb7f04fa2..b1d89ed5b8b88f434e641f202012926832757779 100644 --- a/projects/editor/src/app/components/unit-view/page-view/properties/properties.component.ts +++ b/projects/editor/src/app/components/unit-view/page-view/properties/properties.component.ts @@ -1,7 +1,7 @@ import { Component } from '@angular/core'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; -import { UnitPage } from '../../../../../../../common/unit'; +import { UnitPage, UnitUIElement } from '../../../../../../../common/unit'; import { SelectionService } from '../../../../selection.service'; @Component({ @@ -32,7 +32,11 @@ export class PropertiesComponent { }); this.selectionService.selectedElements .pipe(takeUntil(this.ngUnsubscribe)) - .subscribe(() => { this.expandElementView = true; }); + .subscribe((elements: UnitUIElement[]) => { + if (elements.length > 0) { + this.expandElementView = true; + } + }); } ngOnDestroy(): void {