I'm trying to create a draggable graph similar to http://raphaeljs.com/graffle.html (works in both 1.5.2 and 2.1), but I want to include text in the boxes.
I added the text using the suggestion in another question: How can I combine objects in the Raphael javascript library?
This solution works great with RaphaelJS 1.5.2, but it breaks in RaphaelJS 2.1.
jsFiddle Example: http://jsfiddle.net/ScBtZ/
The only difference I have found is that Element.getBBox()
returns a very different result.
Sample:
In 1.5.2:
SVGRect
height: 40
width: 100
x: 526.5
y: 25
In 2.1:
Object
height: 500780.9482062537
width: 1009980
x: 526.51
x2: 1010506.51
y: -399735.94795512746
y2: 101045.00025112627
Am I missing something about the change from v1.5 to v2, or is this odd BBox a bug? Any ideas how I can fix this issue?
Thanks!