plugins/raphael.export.js
authorAlan Knowles <alan@roojs.com>
Mon, 23 Jul 2012 07:06:37 +0000 (15:06 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 23 Jul 2012 07:06:37 +0000 (15:06 +0800)
plugins/raphael.export.js

index 82065de..76aac66 100644 (file)
        */
        function styleToString(style) {
                // TODO figure out what is 'normal'
-               return 'font: normal normal normal 10px/normal ' + style.font.family + ( style.font.size === null ? '' : '; font-size: ' + style.font.size + 'px' );
+               return 'font: normal normal normal 10px/normal ' + style.font.family +
+            ( style.font.size === null ? '' : '; font-size: ' + style.font.size + 'px' );
        }
 
        /**
        var serializer = {
                'text': function(node) {
                        style = extractStyle(node);
-
+            Roo.log(style);
                        var tags = new Array;
 
                        map(node.attrs['text'].split('\n'), function(text, iterable, line) {
-                                line = line || 0;
+                line = line || 0;
                                tags.push(tag(
                                        'text',
                                        reduce(
 
                                                        return initial;
                                                },
-                                               { style: 'text-anchor: middle; ' + styleToString(style) + ';' }
+                                               {
+                                style: 'text-anchor: middle; ' + styleToString(style) + ';' }
                                                ),
                                        node.matrix,
                                        tag('tspan',