mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-17 10:01:08 +00:00
Update parser.js
Better than getting 0px width and height. Specs say that when they are missing we should consider 100%, in our case 100% will be 100px because we don't have anything to compare the SVG to before adding the SVG into a canvas. Otherwise we could take canvas widht and height.
This commit is contained in:
parent
959bdcfdf4
commit
cd7bea6183
1 changed files with 2 additions and 2 deletions
|
|
@ -510,8 +510,8 @@
|
|||
parseUseDirectives(doc);
|
||||
|
||||
var viewBoxAttr = doc.getAttribute('viewBox'),
|
||||
widthAttr = parseUnit(doc.getAttribute('width')),
|
||||
heightAttr = parseUnit(doc.getAttribute('height')),
|
||||
widthAttr = parseUnit(doc.getAttribute('width') || '100%'),
|
||||
heightAttr = parseUnit(doc.getAttribute('height') || '100%'),
|
||||
viewBoxWidth,
|
||||
viewBoxHeight;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue