dagrejs / dagre-d3

A D3-based renderer for Dagre
MIT License
2.86k stars 592 forks source link

foreignObject wrong height and width after redraw with zoom and translate #336

Open cliedelt opened 6 years ago

cliedelt commented 6 years ago

Hello,

unbenannt

As you can see the foreignObject has the wrong height and width.

Steps to reproduce:

  1. create graph and render it
  2. zoom and move inside the svg with your mouse
  3. create a new graph and render it

Any Recommendations ? I didnt know if you need more code..

christianvoigt commented 5 years ago

Hi, I have similar problems on https://argdown.org/sandbox/map

This used to work, but now in Chrome the nodes seem to be twice as large as they should be. This seems to be a browser issue because I have not updated the code in the last months. If you open the page in Firefox everything is still fine (if you open the page in Edge the nodes are too small though). Maybe there is an issue with getBBox in Chrome?

I tried downgrading Dagre-D3 and removing the zoom and move behaviors, but this does not help. I am pretty sure this is a browser issue.

christianvoigt commented 5 years ago

I found an open chrome issue that could be causing these problems: https://bugs.chromium.org/p/chromium/issues/detail?id=738022&q=foreign-object

lin-credible commented 5 years ago

follow +1