Move Style#font support to SVGStyles.

This commit is contained in:
Jürg Lehni 2013-06-18 16:49:58 -07:00
parent ad034fbb56
commit 938433c51f
3 changed files with 2 additions and 13 deletions

View file

@ -198,15 +198,7 @@ new function() {
}
function exportText(item) {
var attrs = getTransform(item, true),
style = item.getStyle(),
font = style.getFont(),
fontSize = style.getFontSize();
if (font)
attrs['font-family'] = font;
if (fontSize)
attrs['font-size'] = fontSize;
var node = createElement('text', attrs);
var node = createElement('text', getTransform(item, true));
node.textContent = item._content;
return node;
}

View file

@ -375,10 +375,6 @@ new function() {
'fill-opacity': applyOpacity,
'stroke-opacity': applyOpacity,
'font-family': function(item, value) {
item.setFont(value.split(',')[0].replace(/^\s+|\s+$/g, ''));
},
visibility: function(item, value) {
item.setVisible(value === 'visible');
},

View file

@ -24,6 +24,7 @@ var SVGStyles = Base.each({
center: 'middle',
right: 'end'
}],
font: ['font-family', 'string'],
fontSize: ['font-size', 'number']
}, function(entry, key) {
var part = Base.capitalize(key),