strathausen / dracula

JavaScript layout and representation of connected graphs.
https://www.graphdracula.net
MIT License
832 stars 133 forks source link

Node out of bound #81

Open csystem-it opened 2 years ago

csystem-it commented 2 years ago

Hi,

I'm trying to use a custom node render, to make larger nodes with this code:

    function nodeRender(r, n) {
      //the Raphael set is obligatory, containing all you want to display
      return r.set()
        .push(r.rect(-30, -13, 130, 60).attr({
          'fill': '#FFF',
          'fill-opacity': 0,
          'stroke-width': 2,
          r: 9
        }))
        .push(r.text(35, 10, n.label).attr({
          opacity: 1,
          'font-size': 16
        }))
    }

But when i do that, some nodes go out of bound of the selected canvas, i think i need to tell dracula the new node size, but i'm not sure how to do that.

I have a full example here: https://jsfiddle.net/tkheyznr/1/
(i hope jsfiddle is ok)

Thanks in advance