Skip to content

Target Font-size for mouseover transition is hardcoded #299

@Seferin

Description

@Seferin

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions