alexk111 / SVG-Morpheus

JavaScript library enabling SVG icons to morph from one to the other. It implements Material Design's Delightful Details transitions. (THIS PROJECT IS NOT MAINTAINED ANYMORE)
MIT License
2.7k stars 241 forks source link

putting my svg code inside iconset and initializing breaks the svg #28

Open ssuess opened 8 years ago

ssuess commented 8 years ago

My svg looks just fine in a web browser when added normally. But when I add it to an icon set to make it work with SVG-Morpheus, it is no longer correct. I have an X form (made of 4 rectangles).

Here is the svg code that works:

`<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="162.984px" height="163.366px" viewBox="0 0 162.984 163.366" enable-background="new 0 0 162.984 163.366" xml:space="preserve">

`

screen shot 2016-09-02 at 4 27 17 pm

but after adding the following to the iconset it shows as two horizontal lines when morphing or being morphed to:

`

`

screen shot 2016-09-02 at 4 26 46 pm

ssuess commented 8 years ago

I am guessing this code does not work with rect. I converted to path and now it is working.