mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-03-16 22:10:32 +00:00
remove extra tab and newlines (#4524)
This commit is contained in:
parent
1d57f499c6
commit
88a2c7c64a
2 changed files with 6 additions and 6 deletions
|
|
@ -47,9 +47,9 @@
|
|||
(this.fontStyle ? 'font-style="' + this.fontStyle + '" ' : ''),
|
||||
(this.fontWeight ? 'font-weight="' + this.fontWeight + '" ' : ''),
|
||||
(textDecoration ? 'text-decoration="' + textDecoration + '" ' : ''),
|
||||
'style="', this.getSvgStyles(noShadow), '"', this.addPaintOrder(), ' >\n',
|
||||
'style="', this.getSvgStyles(noShadow), '"', this.addPaintOrder(), ' >',
|
||||
textAndBg.textSpans.join(''),
|
||||
'\t\t</text>\n',
|
||||
'</text>\n',
|
||||
'\t</g>\n'
|
||||
);
|
||||
},
|
||||
|
|
@ -91,11 +91,11 @@
|
|||
fillStyles = styleProps ? 'style="' + styleProps + '"' : '';
|
||||
|
||||
return [
|
||||
'\t\t\t<tspan x="', toFixed(left, NUM_FRACTION_DIGITS), '" y="',
|
||||
'<tspan x="', toFixed(left, NUM_FRACTION_DIGITS), '" y="',
|
||||
toFixed(top, NUM_FRACTION_DIGITS), '" ',
|
||||
fillStyles, '>',
|
||||
fabric.util.string.escapeXml(_char),
|
||||
'</tspan>\n'
|
||||
'</tspan>'
|
||||
].join('');
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@
|
|||
'styles': {}
|
||||
};
|
||||
|
||||
var TEXT_SVG = '\t<g transform="translate(10.5 26.72)">\n\t\t<text xml:space="preserve" font-family="Times New Roman" font-size="40" font-style="normal" font-weight="normal" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(0,0,0); fill-rule: nonzero; opacity: 1; white-space: pre;" >\n\t\t\t<tspan x="-10" y="12.57" >x</tspan>\n\t\t</text>\n\t</g>\n';
|
||||
var TEXT_SVG_JUSTIFIED = '\t<g transform="translate(50.5 26.72)">\n\t\t<text xml:space="preserve" font-family="Times New Roman" font-size="40" font-style="normal" font-weight="normal" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(0,0,0); fill-rule: nonzero; opacity: 1; white-space: pre;" >\n\t\t\t<tspan x="-60" y="-13.65" >xxxxxx</tspan>\n\t\t\t<tspan x="-60" y="38.78" style="white-space: pre; ">x </tspan>\n\t\t\t<tspan x=\"40\" y=\"38.78\" >y</tspan>\n\t\t</text>\n\t</g>\n';
|
||||
var TEXT_SVG = '\t<g transform="translate(10.5 26.72)">\n\t\t<text xml:space="preserve" font-family="Times New Roman" font-size="40" font-style="normal" font-weight="normal" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(0,0,0); fill-rule: nonzero; opacity: 1; white-space: pre;" ><tspan x="-10" y="12.57" >x</tspan></text>\n\t</g>\n';
|
||||
var TEXT_SVG_JUSTIFIED = '\t<g transform="translate(50.5 26.72)">\n\t\t<text xml:space="preserve" font-family="Times New Roman" font-size="40" font-style="normal" font-weight="normal" style="stroke: none; stroke-width: 1; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(0,0,0); fill-rule: nonzero; opacity: 1; white-space: pre;" ><tspan x="-60" y="-13.65" >xxxxxx</tspan><tspan x="-60" y="38.78" style="white-space: pre; ">x </tspan><tspan x=\"40\" y=\"38.78\" >y</tspan></text>\n\t</g>\n';
|
||||
|
||||
QUnit.test('constructor', function(assert) {
|
||||
assert.ok(fabric.Text);
|
||||
|
|
|
|||
Loading…
Reference in a new issue