Skip to content
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

Merged
merged 1 commit into from
May 24, 2024

Conversation

M-Wicenec
Copy link
Collaborator

…leciton

@M-Wicenec M-Wicenec merged commit 19828eb into master May 24, 2024
1 check passed
@M-Wicenec M-Wicenec deleted the eagle-1186 branch May 24, 2024 08:22
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a 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

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
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;
Copy link
Contributor

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.

Suggested change
GraphRenderer.ctrlDrag = event.ctrlKey;
GraphRenderer.isCtrlPressed = event.ctrlKey;

}
}

objects.forEach(function(element){
eagle.editSelection(Eagle.RightWindowMode.Hierarchy, element, Eagle.FileType.Graph )
})
}
GraphRenderer.ctrlDrag = false;
Copy link
Contributor

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.

Suggested change
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;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant