Copilot commented on code in PR #3896:
URL: https://github.com/apache/texera/pull/3896#discussion_r2427639961


##########
frontend/src/app/workspace/component/menu/menu.component.ts:
##########
@@ -462,7 +462,9 @@ export class MenuComponent implements OnInit, OnDestroy {
    * This option is only for the current session and will be cleared on 
refresh.
    */
   public onClickToggleGrids(): void {
-    this.workflowActionService.getJointGraphWrapper().toggleGrids();
+    const paper = this.workflowActionService.getJointGraphWrapper().mainPaper;
+    const current = paper.options.gridSize || 1;
+    paper.setGridSize((current % 2) + 1);

Review Comment:
   The magic numbers 1 and 2 for grid sizes should be defined as named 
constants to improve code readability and maintainability.



-- 
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