mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Implement unit test for error behind issue #676
This commit is contained in:
parent
6ec34fbb60
commit
ba092b316e
1 changed files with 10 additions and 0 deletions
|
@ -59,6 +59,16 @@ test('group.bounds and position after children were modified', function() {
|
|||
equals(group.position, new Point(100, 100), 'group.position after change');
|
||||
});
|
||||
|
||||
test('group.bounds when containing empty path first', function() {
|
||||
var group = new Group();
|
||||
var path = new Path();
|
||||
group.addChild(path);
|
||||
equals(group.bounds, new Rectangle(0, 0, 0, 0), 'group.bounds with empty path');
|
||||
path.moveTo([75, 75]);
|
||||
path.lineTo([175, 175]);
|
||||
equals(group.bounds, new Rectangle(75, 75, 100, 100), 'group.bounds after adding segments to path');
|
||||
});
|
||||
|
||||
test('path.bounds when contained in a transformed group', function() {
|
||||
var path = new Path([10, 10], [60, 60]);
|
||||
var group = new Group([path]);
|
||||
|
|
Loading…
Reference in a new issue