From d73e541d4d2a3eb67dc7d9cdfa5e12eb23ebafdd Mon Sep 17 00:00:00 2001 From: Enquier Date: Mon, 20 May 2024 20:42:23 -0600 Subject: [PATCH] fix viewId selection for dynamic sections --- src/ve-app/pane-left/left-pane.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ve-app/pane-left/left-pane.component.ts b/src/ve-app/pane-left/left-pane.component.ts index 0d7b7f3bd..8f8079d85 100644 --- a/src/ve-app/pane-left/left-pane.component.ts +++ b/src/ve-app/pane-left/left-pane.component.ts @@ -434,10 +434,11 @@ class LeftPaneController implements angular.IComponentController { }); } } else if (this.$state.includes('**.present.**')) { - const viewId = branch.type !== 'view' ? branch.viewId : branch.data.id; + let viewId = ''; // If clicked on a PE send the element.selected event for Tool Pane if (!(branch.type === 'view' || branch.type === 'section')) { + viewId = branch.viewId; const data = { elementId: branch.data.id, projectId: branch.data._projectId, @@ -445,6 +446,8 @@ class LeftPaneController implements angular.IComponentController { commitId: 'latest', }; this.eventSvc.$broadcast('element.selected', data); + } else { + viewId = branch.data.id; } void this.$state.go(