PG1204 commented on code in PR #6927:
URL: https://github.com/apache/texera/pull/6927#discussion_r3699704323


##########
frontend/src/app/workspace/service/joint-ui/joint-ui.service.ts:
##########
@@ -491,11 +493,22 @@ export class JointUIService {
    * @param isOperatorValid
    */
   public changeOperatorColor(jointPaper: joint.dia.Paper, operatorID: string, 
isOperatorValid: boolean): void {
-    if (isOperatorValid) {
-      jointPaper.getModelById(operatorID).attr("rect.body/stroke", "#CFCFCF");
-    } else {
-      jointPaper.getModelById(operatorID).attr("rect.body/stroke", "red");
+    this.paintOperatorBorder(jointPaper, operatorID, isOperatorValid ? 
"#CFCFCF" : "red");
+  }
+
+  /**
+   * Sets the operator's border stroke, skipping the write when the border is
+   * already that color. On operator add, the operator-add restore and the
+   * validation pass both request a border color for the same operator; 
guarding
+   * the write here makes the redundant repaint a no-op (see #5726) and 
likewise

Review Comment:
   addressed in 
[c3d7393](https://github.com/apache/texera/pull/6927/commits/c3d7393c01c5dc1d97d25dd136194d3ff6cd655c)



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to