I have problem with the freeTransform that is driving me nuts.
The test site is here
http://dev.yours.se/liko/survey.html
It is a simple drawing tool that makes a representation of a room. To
add symbols to the drawing, just click on one of the symbols.
When I add say circle, move it, add another circle, move that one and
then add a third circle. Then the third circle's free transform
objects totally loses track of reality
here is the code that adds the object to the paper object.
var img = R.importSVG(svgXML);
img.attr({"stroke":stroke,"stroke-width":1,"fill":fill});
var ft = R.freeTransform(img);
ft.opts.scale = scale;
ft.opts.rotate = rotateObject;
ft.opts.distance = 2;
ft.apply();
I do output some data to the console and there you can see that when
the third item is added to the paper, x and y of the boundingBox has
very strange values. However, if you just add three items without
moving them around. Then this error does not appear. With the
debugging I have made I have come to conclusion that it is something
with getBBox() that fails.
First I thought that it was some global value that is messing with me.
But if it was, shouldn´t it fail as soon as I add the second item??
thanks in advance
Tobias