This is an automated email from the ASF dual-hosted git repository.
linxinyuan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/texera.git
The following commit(s) were added to refs/heads/main by this push:
new ecfebf4b60 fix: hide Regions on MiniMap (#4112)
ecfebf4b60 is described below
commit ecfebf4b60e1329829091f6632e664e7819876d5
Author: Xinyuan Lin <[email protected]>
AuthorDate: Sat Dec 6 23:29:06 2025 -0800
fix: hide Regions on MiniMap (#4112)
---
frontend/src/app/workspace/component/menu/menu.component.ts | 6 +++++-
.../component/workflow-editor/workflow-editor.component.scss | 4 ----
.../component/workflow-editor/workflow-editor.component.ts | 3 +--
3 files changed, 6 insertions(+), 7 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..e821bf3add 100644
--- a/frontend/src/app/workspace/component/menu/menu.component.ts
+++ b/frontend/src/app/workspace/component/menu/menu.component.ts
@@ -471,7 +471,11 @@ 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..b23f92caf3 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,6 @@ export class WorkflowEditorComponent implements OnInit,
AfterViewInit, OnDestroy
}
private handleRegionEvents(): void {
- this.editor.classList.add("hide-region");
const Region = joint.dia.Element.define(
"region",
{
@@ -342,7 +341,7 @@ export class WorkflowEditorComponent implements OnInit,
AfterViewInit, OnDestroy
body: {
fill: "rgba(158,158,158,0.2)",
pointerEvents: "none",
- class: "region",
+ visibility: "hidden",
},
},
},