Closed kuzeko closed 11 years ago
Why do you initialize frame and label to empty objects? I wouldn't.. just set them to undefined if you want to. Otherwise seems fine. Have you tried to debug and see what "set" is at the end? How many items does it contain?
Apart from that detail of object initialisation.
Here is a demo on JsBin http://jsbin.com/uhumip/2/
the Set
contains 2 objects, the label and the figure.
The problem is in line 65 of your code frame.attr({"fill": "#69c", "stroke-width": 1, r : "5px"}); "r" should be a number, not a string. That is why only the rect is failing.
You could say it is a raphael bug though, because they should be vetting their input (that's a general problem of html/css, it is horrific to have to parse and build strings with measures all the time).
What a moron I am!
Sorry & thanks!
Haha no problem. I wouldn't have known that if I was writing, either.
I recently started learning debugging, and it has been very useful.
When adding edges between nodes with text inside them, if one of the two is a
rect
the edge won't show up.I tracked the problem down to the
graffle
file wheregetBBox
is not working for the set passed as input to theConnection
function.Not sure if it may be due also to a RaphalelJs bug.
The custom rendered I'm using is :