Update parser.js

Add support to catch attributes from symbol nodes.
This is a quick hack.
To have full support symbol should managed as defs and then copied as g, without display attribute.
But before adding tons of code, let's just make it work.
This commit is contained in:
Andrea Bogazzi 2014-08-07 16:11:31 +02:00
parent 686fa25ce9
commit 8eaba61b17

View file

@ -700,8 +700,8 @@
var value,
parentAttributes = { };
// if there's a parent container (`g` node), parse its attributes recursively upwards
if (element.parentNode && /^[g|a]$/i.test(element.parentNode.nodeName)) {
// if there's a parent container (`g` or `a` or `symbol` node), parse its attributes recursively upwards
if (element.parentNode && /^symbol|[g|a]$/i.test(element.parentNode.nodeName)) {
parentAttributes = fabric.parseAttributes(element.parentNode, attributes);
}