mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-22 04:11:52 +00:00
Merge pull request #1624 from asturur/missing-width-or-height
Update parser.js
This commit is contained in:
commit
392d3e9a7e
1 changed files with 6 additions and 3 deletions
|
|
@ -508,10 +508,13 @@
|
|||
var startTime = new Date();
|
||||
|
||||
parseUseDirectives(doc);
|
||||
|
||||
/* http://www.w3.org/TR/SVG/struct.html#SVGElementWidthAttribute
|
||||
* as per spec, width and height attributes are to be considered
|
||||
* 100% if no value is specified.
|
||||
*/
|
||||
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