fixed bug with getTextSize() which was throwing a JS error if used before adding text to the stage

This commit is contained in:
Eric Rowell
2012-05-12 15:32:27 -07:00
parent 1146919d3d
commit 51258531bf
5 changed files with 39 additions and 4 deletions

View File

@@ -1936,6 +1936,9 @@ Test.prototype.tests = {
verticalAlign: 'middle'
});
// test text width before adding it to stage
test(text.getTextWidth() > 0, 'text width should have a value');
layer.add(text);
stage.add(layer);