-
Notifications
You must be signed in to change notification settings - Fork 9
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
Svg: fixing #29 and #30 #31
Conversation
I looked over this PR and added a number of line-item comments. The PR has a number of improvements, but it's not addressing #30. Your proposal is that every SVG attempt to specify a unique id. That doesn't work for a number of reasons:
This is basically what I outlined already in #30, and IMO illustrates why it would be simpler to inline each icon's text into the javascript layer, and then assign an ID when |
I completely agree there is an issue. |
- fixes bug with ids when loading sprite - removed fallback on filename, now only relying on id in markup - added some tests for absent and empty id, same for viewbox - typos and other bill's feedback - renamed cache variable to loaded - simplifed code in load - renaming extractGraphic to extractGraphicAsSymbol (now it calls createSymbol and returns the symbol)
It would actually be better in the meantime if you continued to default the ID to the filename, or perhaps As for a real fix to #30, there's still the very simple approach I recommended to leverage the A more efficient (although harder) approach would be to have a custom
IIUC it defines a module in the layer called (for example) "requirejs-text/text!foo/bar.svg", where that module's content is simply:
Presumably you could have your own
Obviously it requires a utility |
- switched to local require - catching and reporting exceptions when jsdom isn't found
Merged in 5553e20 |
No description provided.