dagrejs / dagre-d3

A D3-based renderer for Dagre
MIT License
2.83k stars 589 forks source link

node drawn too large with windows display scaling #415

Closed cdburke closed 3 years ago

cdburke commented 3 years ago

Using windows 10 with display scaling > 100%, Chrome browser:

If a node uses labelType html and the html sets height/width or min-height/min-width, then the node is drawn larger than the html contents. It is scaled up by the display scaling.

Instead, the node should be drawn to fit the html.

For example, with scaling 150% and width:100px, then the node width is 153.

This only happens on Chrome, not Firefox or Edge, e.g. Firefox shows a node width of 101.

A complete example is attached.

base.zip

cdburke commented 3 years ago

I just realized that the fix to issue #263 also fixes this problem.

See oxygen's workaround of 21 Feb 2017 at

[https://github.com/dagrejs/dagre-d3/issues/263]