fix tests for new transform generation
This commit is contained in:
parent
5a711d60a9
commit
a271117381
2 changed files with 2 additions and 4 deletions
|
@ -269,8 +269,7 @@ it("Should generate the part transforms", () => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
expect(part.attributes.list.transform.length).to.equal(1)
|
expect(part.attributes.list.transform.length).to.equal(1)
|
||||||
expect(part.attributes.list.transform[0]).to.equal('translate(10,20)')
|
expect(part.attributes.list.transform[0]).to.equal('translate(10 20)')
|
||||||
expect(part.attributes.list['transform-origin'][0]).to.equal('10.5 39')
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -558,8 +558,7 @@ it("Should generate a part transform", () => {
|
||||||
.line(part.points.to);
|
.line(part.points.to);
|
||||||
part.stack();
|
part.stack();
|
||||||
const transform = utils.generatePartTransform(30,60,90,true,true,part)
|
const transform = utils.generatePartTransform(30,60,90,true,true,part)
|
||||||
expect(transform.transform).to.equal("translate(30,60) scale(-1, 1) scale(1, -1) rotate(90)");
|
expect(transform.transform).to.equal(`translate(${30 + part.topLeft.x + part.bottomRight.x} ${60 + part.topLeft.y + part.bottomRight.y}) scale(-1 -1) rotate(90 ${part.topLeft.x + part.width/2} ${part.topLeft.y + part.height/2})`);
|
||||||
expect(transform['transform-origin']).to.equal("10.5 39")
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue