mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-24 21:23:44 +00:00
introduce break test (#4102)
This commit is contained in:
parent
9e076bdcca
commit
392e21312b
2 changed files with 10 additions and 1 deletions
|
|
@ -280,7 +280,7 @@
|
|||
filtered = true;
|
||||
markup.push(
|
||||
'<g transform="', this.getSvgTransform(), this.getSvgTransformMatrix(), '">\n',
|
||||
'<image ', this.getSvgId(), 'xlink:href="', this.getSvgSrc(filtered),
|
||||
'\t<image ', this.getSvgId(), 'xlink:href="', this.getSvgSrc(filtered),
|
||||
'" x="', x, '" y="', y,
|
||||
'" style="', this.getSvgStyles(),
|
||||
// we're essentially moving origin of transformation from top/left corner to the center of the shape
|
||||
|
|
|
|||
|
|
@ -204,6 +204,15 @@
|
|||
});
|
||||
});
|
||||
|
||||
asyncTest('toSVG', function() {
|
||||
createImageObject(function(image) {
|
||||
ok(typeof image.toSVG === 'function');
|
||||
var expectedSVG = '<g transform="translate(138 55)">\n\t<image xlink:href="' + IMG_SRC + '" x="-138" y="-55" style="stroke: none; stroke-width: 0; stroke-dasharray: none; stroke-linecap: butt; stroke-linejoin: miter; stroke-miterlimit: 10; fill: rgb(0,0,0); fill-rule: nonzero; opacity: 1;" width="276" height="110"></image>\n</g>';
|
||||
equal(image.toSVG(), expectedSVG);
|
||||
start();
|
||||
});
|
||||
});
|
||||
|
||||
asyncTest('getSrc', function() {
|
||||
createImageObject(function(image) {
|
||||
ok(typeof image.getSrc == 'function');
|
||||
|
|
|
|||
Loading…
Reference in a new issue