Fix for issue #433 - wrong width/height of image objects

If svg with image objects was parsed the width/height props 
of the image were overridden by width/height of the svg file.
This commit is contained in:
Kienz 2013-02-19 09:19:46 +01:00
parent 9df85553b9
commit ec28167906

View file

@ -403,11 +403,9 @@
* @return {fabric.Image}
*/
fabric.Image.fromElement = function(element, callback, options) {
options || (options = { });
var parsedAttributes = fabric.parseAttributes(element, fabric.Image.ATTRIBUTE_NAMES);
fabric.Image.fromURL(parsedAttributes['xlink:href'], callback, extend(parsedAttributes, options));
fabric.Image.fromURL(parsedAttributes['xlink:href'], callback, extend((options ? fabric.util.object.clone(options) : { }), parsedAttributes));
};
/**