jbenet / depviz

dependency visualizer for the web
https://jbenet.github.io/depviz
MIT License
49 stars 10 forks source link

Long IDs and titles can overflow the card #47

Closed wking closed 7 years ago

wking commented 7 years ago

For example:

overflow

We'll probably want to use clipPath for this, but they're usually globally defined clip paths and we need the same clipping rectangle in lots of different places. The global defines don't play very well with React's component tree, but we can probably get something working like:

  1. Place the text at 0,0.
  2. Clip it with a communal clipPath centered at 0,0.
  3. Translate the clipped text to the appropriate location.

depends on #48