fixed logic in Text that was accessing padding attr directly without using the getter

This commit is contained in:
Eric Rowell
2013-03-17 21:16:08 -07:00
parent e0e390f760
commit e43c2fbeb4
3 changed files with 6 additions and 6 deletions

View File

@@ -113,7 +113,7 @@
context.beginPath();
context.moveTo(0,0);
if (pointerDirection === UP) {
context.lineTo((width - pointerWidth)/2, 0);
context.lineTo(width/2, -1 * pointerHeight);

View File

@@ -152,7 +152,7 @@
* @methodOf Kinetic.Text.prototype
*/
getHeight: function() {
return this.attrs.height === AUTO ? (this.getTextHeight() * this.textArr.length * this.getLineHeight()) + this.attrs.padding * 2 : this.attrs.height;
return this.attrs.height === AUTO ? (this.getTextHeight() * this.textArr.length * this.getLineHeight()) + this.getPadding() * 2 : this.attrs.height;
},
/**
* get text width