dagrejs / dagre-d3

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

label foreignObject size use g.node's size rather than getBoundingCli… #386

Closed Ghost-White closed 4 years ago

Ghost-White commented 4 years ago

Dear friends, when I use dagre-d3 to draw a dag graph, it works very well, thanks very much. When I use html templates as label of nodes, it still works well. But when I changed the window scale percentage to 80% or other percentage not 100% by command + or command - , it can not work well on chrome and safari, but work well on firefox. It seems that the reason is: the getBoundingClientRect api calculated different value on different browser. When I use the nodes' width and height to replace getBoundingClientRect, it works well.

Ghost-White commented 4 years ago

this commit still can not resolve the problem