mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-25 21:53:44 +00:00
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:
parent
9df85553b9
commit
ec28167906
1 changed files with 1 additions and 3 deletions
|
|
@ -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));
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue