Skip to content

Conversation

@romans1995
Copy link

No description provided.

@@ -1,0 +1,222 @@
let Tasks = {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

divide & wrap functions into smaller functions

}

let mouseHover;
let onAlt = false;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't use global variables. They only cause trouble. Find a different way to do this.

let onAlt = false;
// making on keydown and key up global
document.onkeydown = (e) => {
if (e.key === 'Alt') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a better way to check if alt is pressed. Read about keyboard events

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

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.

3 participants