Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add zoom functionality to wafermap #923
Add zoom functionality to wafermap #923
Changes from 18 commits
151764f
33b7fdf
139022c
8ff919b
41d6eae
a58030e
4dfca2b
d4015ba
232b1ee
0eedc58
e1fb9a0
abba7ff
649c3a2
06391a8
bdfd705
6e5c220
b4bd650
55d84f9
489ce1c
09f4eae
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
We should remove this event listener in the
disconnectedCallback
, otherwise we'll end up with duplicate listeners if the same element is added, removed, and re-added to the page.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.
@arinluca333 I don't think the approach you used in
removeEventListener()
will work. I believe the add/remove functions track the listener function by reference. You're attempting to remove a new listener function which is a copy of the original one. So removeEventListener won't find any listener that matches it and will silently fail.From the MDN docs:
Instead you need to save the event listener to a class member variable and pass that variable to both
addEventListener
andremoveEventListener
.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.
I filed #964 to you to track fixing this.
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.
Yep, the exact same function reference must be used, concretely (pseudocode):