This is an automated email from the ASF dual-hosted git repository. linxinyuan pushed a commit to branch xinyuan-fix-region-map in repository https://gitbox.apache.org/repos/asf/texera.git
commit 2f69373ed379a955e1d5cd2888974ec96918f2e6 Author: Xinyuan Lin <[email protected]> AuthorDate: Sat Dec 6 00:03:43 2025 -0800 init --- frontend/src/app/workspace/component/menu/menu.component.ts | 7 ++++++- .../component/workflow-editor/workflow-editor.component.scss | 4 ---- .../component/workflow-editor/workflow-editor.component.ts | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/frontend/src/app/workspace/component/menu/menu.component.ts b/frontend/src/app/workspace/component/menu/menu.component.ts index 1096b3af0d..9bcbee28e5 100644 --- a/frontend/src/app/workspace/component/menu/menu.component.ts +++ b/frontend/src/app/workspace/component/menu/menu.component.ts @@ -471,7 +471,12 @@ export class MenuComponent implements OnInit, OnDestroy { } public toggleRegion(): void { - this.workflowActionService.getJointGraphWrapper().mainPaper.el.classList.toggle("hide-region", !this.showRegion); + this.workflowActionService + .getJointGraphWrapper() + .jointGraph + .getElements() + .filter(el => el.get('type') === 'region') // small improvement here too + .forEach(el => el.attr('body/visibility', this.showRegion ? 'visible' : 'hidden')); } /** diff --git a/frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.scss b/frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.scss index 72caad0296..fad009b223 100644 --- a/frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.scss +++ b/frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.scss @@ -25,10 +25,6 @@ height: 100%; } -::ng-deep .hide-region .region { - display: none; -} - ::ng-deep .hide-worker-count .operator-worker-count { display: none; } diff --git a/frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.ts b/frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.ts index ca76a5d2f2..8782956ec7 100644 --- a/frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.ts +++ b/frontend/src/app/workspace/component/workflow-editor/workflow-editor.component.ts @@ -334,7 +334,7 @@ export class WorkflowEditorComponent implements OnInit, AfterViewInit, OnDestroy } private handleRegionEvents(): void { - this.editor.classList.add("hide-region"); + //this.editor.classList.add("hide-region"); const Region = joint.dia.Element.define( "region", {
