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: allow AdvancedMarker to accept space-separated multiple class names #143

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

shuuji3
Copy link
Contributor

@shuuji3 shuuji3 commented Dec 28, 2023

fix #142

If we want to use classList.add to add multiple class names while keeping the existing class names, we could write like this:

const classNames = className.split(' ')
el.classList.add(...classNames);

But we simply add class names to a brand new div element here so I think we can add the provided className as is.

@usefulthink
Copy link
Collaborator

Looks good, thanks!

@usefulthink usefulthink merged commit eab53e2 into visgl:main Jan 5, 2024
2 checks passed
@shuuji3 shuuji3 deleted the fix/advanced-marker-set-classnames branch January 11, 2024 05:41
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.

[Bug] Adding more than one class to AdvancedMarkers className throws an error
2 participants