plugins/raphael.export.js
authorEdward <edward@roojs.com>
Wed, 9 Jan 2019 08:50:42 +0000 (16:50 +0800)
committerEdward <edward@roojs.com>
Wed, 9 Jan 2019 08:50:42 +0000 (16:50 +0800)
plugins/raphael.export.js

index 75a4988..60b896d 100644 (file)
 
     var serializer = {
         'text': function (node) {
-            Roo.log(node);
+            
             style = extractStyle(node);
-            Roo.log(style);
+            
             var tags = new Array;
             
             var content = [];
             
-            Roo.log(node.attrs['text']);
-            Roo.log(node.attrs['text'].split('\n'));
-            
             var textArray = node.attrs['text'].split('\n');
             
             textArray.forEach((v,k) => {
                 
             });
             
-            Roo.log(content);
             tags.push(tag(
                 'text',
                 reduce(
                 node.matrix,
                 content.join("")
             ));
-            
-//            map(node.attrs['text'].split('\n'), function (text, iterable, line) {
-//                line = line || 0;
-//                tags.push(tag(
-//                        'text',
-//                        reduce(
-//                                node.attrs,
-//                                function (initial, value, name) {
-//                                    if (name !== 'text' && name !== 'w' && name !== 'h') {
-//                                        if (name === 'font-size')
-//                                            value = value + 'px';
-//
-//                                        initial[name] = escapeXML(value.toString());
-//                                    }
-//
-//                                    return initial;
-//                                },
-//                                {
-//                                    style: 'text-anchor: ' + (style.font.anchor ? (style.font.anchor + ';') : 'middle;') +
-//                                            styleToString(style) + ';'
-//                                }
-//                        ),
-//                        node.matrix,
-//                        tag('tspan',
-//                                {
-//                                    dy: computeTSpanDy(style.font.size, line + 1, node.attrs['text'].split('\n').length)
-//                                },
-//                                null,
-//                                escapeXML(text)
-//                                )
-//                        ));
-//            });
-
+    
             return tags;
         },
         'path': function (node) {