Search the Community
Showing results for tags 'use'.
-
Hi everyone! Sorry, if the answer is already there, but I couldn't find it. I have 2 SVG tags. 1) Source SVG sprite with 2 <rect> shapes. 2) And the second SVG is pulling elements from the first SVG with <use> tag. The task is to move both shapes from the source SVG to the same point (x, y) using your library. Now they are moving together and to different points. Thanks for your attention, and any help would be greatly appreciated. Thank you!
-
Dear community, I got to code a one-page website. It got quite a lot of sections and SVG elements with a lot of elements. As I want to animate them, I thought I got to include them into my html document. Doing so creates a massive file with way to many lines to work productive inside the document. Googling I found the `<use>` tag to reference groups or shapes, but it seems like its not suitable to reference a whole external .svg file. So thats my question: - How do you handle HTML files with a lot of SVG code? - Can I somehow use the external SVG files for internal use? As a tweak, I know that SVG for Everybody https://github.com/jonathantneal/svg4everybody creates a polyfill by adding external SVG files into the DOM for IE9+. Can I somehow "always enable" this, even if I know that its not the most appropriate way? To keep it simple: Its a "big thoughts low budget" project, so it does not need to a the professional solution at all and only has to support the newest browser (while IE9+ would be good). Thanks in advance for any suggestions and let me know if you got any questions, Marian.
-
Hello, I am trying to make a morph using <use xlink:href="#ID"> But I don't know how convert it or if is possible... Here is a normal example: http://codepen.io/lagden/pen/WxNyzO Here is a example using xlink: http://codepen.io/lagden/pen/GqRGoR The expected on second example is: Morph circle to square when user click on element, but show this message at console: WARNING: cannot morph a <USE> SVG element. Use MorphSVGPlugin.convertToPath(elementOrSelectorText) to convert to a path before morphing. Regards, Thiago Lagden