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) {