Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create symbols & fallback for unexpected type #39

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions svg.import.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@
case 'defs':
convertNodes(child.childNodes, context.defs(), level + 1, store, block)
break
case 'symbol':
element = context.symbol()
convertNodes(child.childNodes, element, level + 1, store, block)
break
case 'use':
element = context.use()
break
Expand Down Expand Up @@ -126,6 +130,7 @@
break
default:
console.log('SVG Import got unexpected type ' + type, child)
convertNodes(child.childNodes, context.nested(), level + 1, store, block)
break
}

Expand Down
2 changes: 1 addition & 1 deletion svg.import.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.