This is an automated email from the ASF dual-hosted git repository.
leonbao 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 41efe30 fix this issue (#8280)
41efe30 is described below
commit 41efe305bb40097bf5cfd4c948d49ff787a4634c
Author: calvin <[email protected]>
AuthorDate: Fri Feb 4 16:41:16 2022 +0800
fix this issue (#8280)
---
.../conf/home/pages/dag/_source/canvas/canvas.vue | 29 ++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git
a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/canvas.vue
b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/canvas.vue
index 67c56a6..7a7f41d 100644
--- a/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/canvas.vue
+++ b/dolphinscheduler-ui/src/js/conf/home/pages/dag/_source/canvas/canvas.vue
@@ -277,6 +277,35 @@
edge.setSource(sourceNode)
}
})
+
+ // Add a node tool when the mouse entering
+ this.graph.on('node:mouseenter', ({ e, x, y, node, view }) => {
+ const nodeName = node.getData().taskName
+ node.addTools({
+ name: 'button',
+ args: {
+ markup: [
+ {
+ tagName: 'text',
+ textContent: nodeName,
+ attrs: {
+ fill: '#868686',
+ 'font-size': 16,
+ 'text-anchor': 'center'
+ }
+ }
+ ],
+ x: 0,
+ y: 0,
+ offset: { x: 0, y: -10 }
+ }
+ })
+ })
+
+ // Remove all tools when the mouse leaving
+ this.graph.on('node:mouseleave', ({ node }) => {
+ node.removeTools()
+ })
},
/**
* @param {Edge|string} edge