Skip to content

Commit

Permalink
Add 'deltaY' attribute
Browse files Browse the repository at this point in the history
Added 'deltaY' to '_styleProperties' and updated 'getSvgSpanStyles' for 'deltaY' -> 'baseline-shift'
  • Loading branch information
denim2x committed Aug 7, 2017
1 parent ddb9896 commit e4432c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/mixins/object.svg_export.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@

/**
* Returns styles-string for svg-export
* @param {Boolean} skipShadow a boolean to skip shadow filter output
* @return {String}
*/
getSvgSpanStyles: function(style) {
Expand All @@ -71,7 +70,8 @@
fontWeight = style.fontWeight ? 'font-weight: ' + style.fontWeight + '; ' : '',
fill = style.fill ? getSvgColorString('fill', style.fill) : '',
stroke = style.stroke ? getSvgColorString('stroke', style.stroke) : '',
textDecoration = this.getSvgTextDecoration(style);
textDecoration = this.getSvgTextDecoration(style),
deltaY = style.deltaY ? 'baseline-shift: ' + (-style.deltaY) + '; ' : '';

return [
stroke,
Expand All @@ -82,6 +82,7 @@
fontWeight,
textDecoration,
fill,
deltaY,
].join('');
},

Expand Down
3 changes: 2 additions & 1 deletion src/shapes/text.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,8 @@
'fontStyle',
'underline',
'overline',
'linethrough'
'linethrough',
'deltaY',
],

/**
Expand Down

0 comments on commit e4432c8

Please sign in to comment.