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

https://github.com/lautr3k/lw.svg-parser/issues/4 #5

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

jorgerobles
Copy link

Added silly symbol support (only visualization, treated as a def.)

@ghost
Copy link

ghost commented Jan 2, 2017

Cool!
Before i merge your commit, could you change

let element = this.parser.defs[target]
if (! element)
    element = this.parser.symbols[target];

by

let element = this.parser.defs[target] || this.parser.symbols[target];

Thanks (btw i always use brackets, even when there is only one instruction)

@jorgerobles
Copy link
Author

Done!

Sébastien Mischler (aka skarab) and others added 3 commits January 3, 2017 09:09
> Note that a symbol element itself is not rendered. Only instances of a symbol element (i.e., a reference to a symbol by a <use> element) are rendered.

https://developer.mozilla.org/fr/docs/Web/SVG/Element/symbol
@jorgerobles
Copy link
Author

jorgerobles commented Jan 3, 2017

Hmm with bf11bca the symbol is never rendered on <use>. The no rendering is correct, but then the symbol children should be appended as use children.

I've added array support for use but is surely wrong as replaces the use tag with the instance. Propose a non-standard element <instance> or <g> to wrap the symbol childnodes.
Should use be a non-skip tag so acts as wrapper?

symbol.svg.zip

@ghost
Copy link

ghost commented Jan 3, 2017

I worked on this all the day and I think there's a big problem in the heart of the parser... I will resume the investigations quietly tomorrow...

@ghost
Copy link

ghost commented Jan 4, 2017

I have found a way to have full CSS support ;) and a better way to handle attributes, I am refactoring the entire library...

@jorgerobles
Copy link
Author

Cheer Up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant