-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can now use shit plus ctrl to drag to deselect multiple nodes from se… #688
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @M-Wicenec - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 2 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
@@ -1090,6 +1090,7 @@ export class GraphRenderer { | |||
|
|||
static mouseMove(eagle: Eagle, event: JQuery.TriggeredEvent) : void { | |||
const e: MouseEvent = event.originalEvent as MouseEvent; | |||
GraphRenderer.ctrlDrag = event.ctrlKey; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Consider renaming 'ctrlDrag' for clarity.
The variable name 'ctrlDrag' might be misleading as it suggests dragging with the control key. Consider renaming it to something more descriptive like 'isCtrlPressed' to better reflect its purpose.
GraphRenderer.ctrlDrag = event.ctrlKey; | |
GraphRenderer.isCtrlPressed = event.ctrlKey; |
} | ||
} | ||
|
||
objects.forEach(function(element){ | ||
eagle.editSelection(Eagle.RightWindowMode.Hierarchy, element, Eagle.FileType.Graph ) | ||
}) | ||
} | ||
GraphRenderer.ctrlDrag = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: Reset 'ctrlDrag' earlier in the method.
Consider resetting 'ctrlDrag' earlier in the method to ensure it is always reset, even if an exception occurs later in the method.
GraphRenderer.ctrlDrag = false; | |
GraphRenderer.ctrlDrag = false; | |
try { | |
eagle.editSelection(Eagle.RightWindowMode.Hierarchy, element, Eagle.FileType.Graph) | |
} catch (error) { | |
// Handle error if necessary | |
} | |
GraphRenderer.selectionRegionStart.x = 0; |
…leciton