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 for element ID gets overwritten #58

Merged
merged 4 commits into from
Apr 30, 2021
Merged

Fix for element ID gets overwritten #58

merged 4 commits into from
Apr 30, 2021

Conversation

pverscha
Copy link
Member

If an element ID is already set, the visualization should not overwrite it. This PR provides a fix for the bug reported in #55.

@pverscha pverscha added the bug label Mar 12, 2021
@pverscha pverscha requested a review from bmesuere March 12, 2021 08:19
@pverscha pverscha self-assigned this Mar 12, 2021
Copy link
Member

@bmesuere bmesuere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can see, the id isn't necessary anymore and can be removed entirely.

@pverscha pverscha requested a review from bmesuere March 15, 2021 12:42
@pverscha
Copy link
Member Author

ID's are no longer being used now :)

@@ -952,7 +949,7 @@ export default class Heatmap {
private initTooltip() {
return d3.select("body")
.append("div")
.attr("id", this.element.id + "-tooltip")
.attr("id", Math.floor(Math.random() * 2**16) + "-tooltip")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think id's must start with a letter according to the spec

@pverscha pverscha requested a review from bmesuere April 30, 2021 09:28
@pverscha pverscha merged commit f63d510 into develop Apr 30, 2021
@pverscha pverscha deleted the fix/overwrite-id branch April 30, 2021 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants