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

fix: BarNote getSVGElement always returning undefined #1618

Merged
merged 3 commits into from
Apr 20, 2024

Conversation

judocode
Copy link
Contributor

BarNote is not opening its own context group which means it fails to perform operations requiring the id of the Element such as getSVGElement, addClass, removeClass etc.

I also added barline as a property of barnote to memoize it and have direct access to the barline if one needs it.

It looks like there are not any tests for the barnote directly but I added a test for the error scenario I was running into where getSVGElement was always returning undefined for rendered BarNotes

@AaronDavidNewman
Copy link
Collaborator

Hi @judocode I just pulled the latest version of your branch, did npm install and grunt webpack:debug. I see the following error in Barline tests.

I'm thinking your check should skip the undefined check if the renderer is canvas.

image

@judocode
Copy link
Contributor Author

Ahh thanks @AaronDavidNewman - my tests were timing out for an unrelated issue it seems, but I added that check and was able to run all tests 👍

@AaronDavidNewman
Copy link
Collaborator

This looks good, thanks for your contribution.

@AaronDavidNewman AaronDavidNewman merged commit c1d8ac2 into 0xfe:master Apr 20, 2024
2 checks passed
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

2 participants