You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "calvinjiang (via GitHub)" <gi...@apache.org> on 2023/08/31 07:19:17 UTC

[GitHub] [dolphinscheduler] calvinjiang commented on a diff in pull request #14837: [Improvement-14835][UI] Support to immediately adjust the fill color of the task node after changing the run flag of the task.

calvinjiang commented on code in PR #14837:
URL: https://github.com/apache/dolphinscheduler/pull/14837#discussion_r1311199345


##########
dolphinscheduler-ui/src/views/projects/workflow/components/dag/use-cell-update.ts:
##########
@@ -51,6 +51,18 @@ export function useCellUpdate(options: Options) {
     }
   }
 
+  /**
+   * Set the node's fill color by id
+   * @param {string} id
+   * @param {string} color
+   */
+  function setNodeFillColor(id: string, color: string) {
+    const node = graph.value?.getCellById(id)
+    if (node) {
+      node.attr('rect/fill', color)
+    }

Review Comment:
   @songjianet  Here I used the same way like the below code snippet.
   <img width="612" alt="image" src="https://github.com/apache/dolphinscheduler/assets/4928204/5c99a160-1b68-42b5-8932-5aae81e3c7e3">
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org