mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-17 18:11:08 +00:00
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:
parent
686fa25ce9
commit
8eaba61b17
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue