Add test for bounds of path item inside transformed group.

This commit is contained in:
Jonathan Puckey 2012-11-28 18:25:20 +01:00
parent 9ff39eb603
commit 41b2047a88

View file

@ -50,4 +50,12 @@ test('group.bounds when group contains empty group', function() {
compareRectangles(group.bounds, { x: 75, y: 75, width: 100, height: 100 }, 'group.bounds without empty group');
group.addChild(new Group());
compareRectangles(group.bounds, { x: 75, y: 75, width: 100, height: 100 }, 'group.bounds with empty group');
});
test('path.bounds when contained in a transformed group', function() {
var path = new Path([10, 10], [60, 60]);
var group = new Group([path]);
compareRectangles(path.bounds, { x: 10, y: 10, width: 50, height: 50 }, 'path.bounds before group translation');
group.translate(100, 100);
compareRectangles(path.bounds, { x: 110, y: 110, width: 50, height: 50 }, 'path.bounds after group translation');
});