stage.setSize() now correctly sets the content node dimensions. Also refactored object and DOM node sizing

This commit is contained in:
Eric Rowell
2012-04-28 12:23:23 -07:00
parent 3ac0e5592e
commit 9f6381aef3
4 changed files with 40 additions and 34 deletions

View File

@@ -228,11 +228,15 @@ Test.prototype.tests = {
test(stage.getSize().width === 578, 'stage height should be 578');
test(stage.getSize().height === 200, 'stage width should be 200');
test(stage.getDOM().style.width === '578px', 'content height should be 578px');
test(stage.getDOM().style.height === '200px', 'content width should be 200px');
stage.setSize(300, 150);
test(stage.getSize().width === 300, 'stage height should be 300');
test(stage.getSize().height === 150, 'stage width should be 150');
test(stage.getDOM().style.width === '300px', 'content height should be 300px');
test(stage.getDOM().style.height === '150px', 'content width should be 150px');
layer.add(circle);
stage.add(layer);