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

Target Font-size for mouseover transition is hardcoded #299

Open
Seferin opened this issue Feb 20, 2023 · 0 comments
Open

Target Font-size for mouseover transition is hardcoded #299

Seferin opened this issue Feb 20, 2023 · 0 comments

Comments

@Seferin
Copy link

Seferin commented Feb 20, 2023

In diagonalNetwork.js the font-size for mouseover transition is hardcoded to 25px:

// mouseover event handler
function mouseover() {
  d3.select(this).select("circle").transition()
    .duration(750)
    .attr("r", 9);

  d3.select(this).select("text").transition()
    .duration(750)
    .style("stroke-width", ".5px")
    .style("font", "25px " + x.options.fontFamily)
    .style("opacity", 1);
}

This works fine when networkD3::diagonalNetwork() is called with a fontsize of 10 - mouseover makes the label text larger - but when networkD3::diagonalNetwork() is called with a fontsize of 35 the label becomes smaller with mouseover.

Can a transition target fontsize parameter option be added to the call?

Or alternatively, can the px value be set relative to the fontsize option in the call?

Example of issue in report created from DataExplorer that passes a fontsize default of 35 to a networkD3::diagonalNetwork() call:

image

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

1 participant