Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Attach event listeners to canvas whenever possible #112

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

catruge
Copy link
Collaborator

@catruge catruge commented May 25, 2021

Hi. This pull request attaches event listeners in the setup code to the canvas element instead of the window element whenever possible. This hinders the listeners from interfering with the rest of the page and also removes the need to check whether the emitter of an event is indeed the canvas. Also, this pull request refactors the keyboard and mouse listeners to (hopefully) aid readability. However, I haven't tested the refactored code, so this pull request should not be merged yet.

@catruge catruge force-pushed the attach-events-to-canvas branch from 05884e0 to ed599ae Compare May 25, 2021 22:15
@catruge catruge force-pushed the attach-events-to-canvas branch from 04e523d to f7d1288 Compare May 25, 2021 23:47
@catruge catruge marked this pull request as ready for review May 25, 2021 23:50
@catruge catruge requested a review from JonComo May 25, 2021 23:50
@catruge catruge force-pushed the attach-events-to-canvas branch 2 times, most recently from 03a9fd9 to bbea6e2 Compare June 21, 2021 17:28
@catruge catruge marked this pull request as draft January 3, 2022 22:51
@catruge catruge force-pushed the attach-events-to-canvas branch from 853feee to 634e297 Compare November 21, 2022 01:53
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant