Some lint error resolve
This commit is contained in:
Лаврёнов Антон
2014-02-27 08:19:29 +08:00
parent a7ceaa8f24
commit 2757842935
3 changed files with 47 additions and 17 deletions

View File

@@ -275,4 +275,19 @@ suite('Text', function(){
assert(text.getHeight() > height, 'height should have increased');
});
test('get text width', function() {
var stage = addStage();
var layer = new Kinetic.Layer();
stage.add(layer);
var text = new Kinetic.Text({
text : 'hello asd fasdf asdf asd fasdf asdfasd fa sds helloo',
fill : 'black',
width: 100
});
layer.add(text);
layer.draw();
assert.equal(text.getTextWidth() > 0 && text.getTextWidth() < 100, true);
});
});