You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by so...@apache.org on 2022/03/30 02:52:40 UTC
[dolphinscheduler] branch dev updated: [Fix][UI Next][V1.0.0-Alpha] Fix the connection line center bug for workflow dag (#9272)
This is an automated email from the ASF dual-hosted git repository.
songjian pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
The following commit(s) were added to refs/heads/dev by this push:
new 11d9859 [Fix][UI Next][V1.0.0-Alpha] Fix the connection line center bug for workflow dag (#9272)
11d9859 is described below
commit 11d9859c407caa6ad287b1a9c64bbfda4b669b87
Author: Devosend <de...@gmail.com>
AuthorDate: Wed Mar 30 10:52:32 2022 +0800
[Fix][UI Next][V1.0.0-Alpha] Fix the connection line center bug for workflow dag (#9272)
* fix the connection line center bug for workflow dag
* delete unnecessary code
---
.../src/views/projects/workflow/components/dag/dag-config.ts | 4 +---
.../src/views/projects/workflow/components/dag/use-canvas-init.ts | 7 +++++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-config.ts b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-config.ts
index b84adea..e988dd4 100644
--- a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-config.ts
+++ b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/dag-config.ts
@@ -187,9 +187,7 @@ export const NODE = {
},
fo: {
refX: '46%',
- refY: -25,
- width: 18,
- height: 18
+ refY: -25
}
},
ports: {
diff --git a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-canvas-init.ts b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-canvas-init.ts
index 1c422ee..c83e751a 100644
--- a/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-canvas-init.ts
+++ b/dolphinscheduler-ui-next/src/views/projects/workflow/components/dag/use-canvas-init.ts
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-import type { Node } from '@antv/x6'
+import type { Markup, Node } from '@antv/x6'
import { ref, onMounted, Ref } from 'vue'
import { Graph } from '@antv/x6'
import { NODE, EDGE, X6_NODE_NAME, X6_EDGE_NAME } from './dag-config'
@@ -156,6 +156,9 @@ export function useCanvasInit(options: Options) {
// Add a node tool when the mouse entering
graph.value.on('node:mouseenter', ({ node }) => {
const nodeName = node.getData().taskName
+ const markup = node.getMarkup() as Markup.JSONMarkup[]
+ const fo = markup.filter((m) => m.tagName === 'foreignObject')[0]
+
node.addTools({
name: 'button',
args: {
@@ -172,7 +175,7 @@ export function useCanvasInit(options: Options) {
],
x: 0,
y: 0,
- offset: { x: 0, y: -10 }
+ offset: { x: 0, y: fo ? -28 : -10 }
}
})
})