plugins/raphael.export.js
[raphael] / plugins / raphael.export.js
index 48d8f36..e8a4503 100644 (file)
                },
                'path' : function(node) {
                        var initial = ( node.matrix.a === 1 && node.matrix.d === 1 ) ? {} : { 'transform' : node.matrix.toString() };
-
+            
+            
+            
                        return tag(
                                'path',
                                reduce(
                                        node.attrs,
                                        function(initial, value, name) {
-                                               if ( name === 'path' ) name = 'd';
+                                               if ( name === 'path' ) {
+                            name = 'd';
+                        }
 
                                                initial[name] = (typeof(value) == 'undefined') ? '' : value.toString();
 
                                                return initial;
                                        },
-                                       {}
+                    {
+                            style:  'fill:' + Raphael.color(node.attrs.fill).hex + ';'
+                    }
                                ),
                                node.matrix
                                );