From e3fc068724bbd5897ac6f73700203ea4d4a49af2 Mon Sep 17 00:00:00 2001 From: jojohoch <joachim.hoch@iqb.hu-berlin.de> Date: Tue, 27 Jun 2023 10:55:57 +0200 Subject: [PATCH] [editor] Do not provide compound elements for visibility rules They are treated as containers by the player and therefore have no values that can be queried. --- .../editor/src/app/components/canvas/section-menu.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projects/editor/src/app/components/canvas/section-menu.component.ts b/projects/editor/src/app/components/canvas/section-menu.component.ts index 8850043d8..11b5a24cc 100644 --- a/projects/editor/src/app/components/canvas/section-menu.component.ts +++ b/projects/editor/src/app/components/canvas/section-menu.component.ts @@ -5,7 +5,7 @@ import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; import { Clipboard } from '@angular/cdk/clipboard'; import { MessageService } from 'common/services/message.service'; -import { UIElement } from 'common/models/elements/element'; +import { CompoundElement, UIElement } from 'common/models/elements/element'; import { Section } from 'common/models/section'; import { DropListElement } from 'common/models/elements/input-elements/drop-list'; import { IDService } from 'editor/src/app/services/id.service'; @@ -340,6 +340,7 @@ export class SectionMenuComponent implements OnDestroy { private getControlIds(): string[] { return this.unitService.unit.getAllElements() + .filter(element => !(element instanceof CompoundElement)) .map(element => element.id) .concat(this.unitService.unit.stateVariables .map(element => element.id)); -- GitLab