kangax/fabric.js — Issue #73: Imported SVGs - bounds incorrect
Author: lukaszm
Created: 2011-11-04 14:13:42+00:00
State: open

Hi,

First of all thanks for the very useful library. Unfortunately it seems to have some difficulty dealing with some SVG files, especially if they contain element transforms and viewboxes. Here are two samples:
http://rapidplan.net/test/sample2.svg
http://rapidplan.net/test/sample4.svg

Importing sample2.svg to a fabric canvas results in the objects being drawn on the canvas, however outside of their bounding box (topleft of the box, but mouse events still caught inside the box only). Additionally the stroke width of the black spline doesn't seem to be recognized.

With sample4..svg it gets even more interesting. Some of the paths that form the road are being drawn inside the bounding box, others outside of it (well off the topleft cornet).

Would you be able to take a look at these samples and see if you can work out why this is happening? Also, is there any documentation for the SVG importer, for example describing what subset of SVG is supported?

Thanks.
Lukasz