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

Calling webtreemap.render twice adds second style tag #27

Open
nikolay-borzov opened this issue May 12, 2019 · 2 comments
Open

Calling webtreemap.render twice adds second style tag #27

nikolay-borzov opened this issue May 12, 2019 · 2 comments

Comments

@nikolay-borzov
Copy link

nikolay-borzov commented May 12, 2019

Use case - render a different map on bundle select in drop-down. Like in https://github.com/danvk/source-map-explorer.
Maybe it's better to place css in a separate file?
Another solution - clear container content

@evmar
Copy link
Owner

evmar commented May 12, 2019

I think clearing the container content is the best option.

In the first version of webtreemap I had the CSS in a different file, but it becomes cumbersome to integrate into apps -- you end up needing to have the app copy and paste the CSS, which then means we can't make changes to the CSS across versions and so on. If you had any other ideas I'm open to them.

@nikolay-borzov
Copy link
Author

Separate CSS file worked just fine for my case. I already inject webtreemap js into HTML template anyway. We just paste content of webtreemap.js into generated HTML file.

For now, clearing container should work as well.

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

No branches or pull requests

2 participants