kangax/fabric.js — Issue #113: Issue with SVG's rendering improperly
Author: naharris212
Created: 2012-01-26 20:34:28+00:00
State: open

When this SVG is opened with a browser it renders perfect. In Fabric certain layers are placed wrong.

Heres a link to an example SVG.

www.creativeasel.com/map_forest_lighthouse.svg

heres the code

fabric.loadSVGFromURL(url, function(objects, options) {

var loadedObject;

if (objects.length > 1) {

loadedObject = new fabric.PathGroup(objects, options);
}
else {
loadedObject = objects[0];
}

loadedObject.set({
left: left,
top: top,
angle: 0,
opacity: 0

});
//loadedObject.scaleToWidth(300).setCoords();
canvas.add(loadedObject);
canvas.calcOffset();

animateDragAndDrop(loadedObject);

});