-
Notifications
You must be signed in to change notification settings - Fork 422
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
SVGs inserted with use tag not displaying ~5 #2384
Comments
Same problem |
hi @justinbmeyer, i work with the op (@justthismorning). i investigated the issue farther and found that the svg-element has dimensions (70px by 70px), but the (child) use-element does not have dimensions (0px by 0px) (vs ting.com). when i inspect (with chrome) the use-element (in 'Properties' sidebar), the 'use' | 'href: SVGAnimatedString' is missing the svg-uri for baseVal & animVal (vs ting.com & initial-server-render). i believe can.stache is not calling the namespace-specific set-attribute function (i.e. el.setAttributeNS())...
what is the best way to set el.setAttributeNS() in can.stache? |
@tracer99 is experiencing this issue and is blocking him from using client-side routing, just to note. Partially to myself so that I make the effort to fix it in 3.0. |
…use namespace-specific 'el.setAttributeNS()' must be used to set 'xlink:href'-attribute instead of 'el.setAttribute() (#canjs#2384)
@matthewp do you mean server side rendering? I'm not sure what routing has to do w/ this? |
I closed #2438 since it was pointing to the master branch which now has the 3.0 code. @colin-tucows if you submit a new pull request to the |
Fixes #2384, namespace attributes attempt to set via setAttributeNS
Summary
SVG with
<use xlink:href>
is not working. There's a pull request here: #2438 though I'm not sure it's the right way of doing it. I think we need a more general way of identifying the right namespace. Once fixed in 2.3, fix in 3.0 in this issue.Original issue
Originally reported here: donejs/donejs#647
Inserting an svg with the
use
tag displays the svg when rendered from the server, but rendering from the client shows a container the correct size but does not display the svg.This displays an empty space 70px square:
icons.txt
This works as expected:
The text was updated successfully, but these errors were encountered: