fixed up logical error in Text shape

This commit is contained in:
Eric Rowell 2012-07-01 17:14:15 -07:00
parent 66f29c602e
commit 3e0ed1c2fb
3 changed files with 3 additions and 3 deletions

View File

@ -4055,7 +4055,7 @@ Kinetic.Text.prototype = {
var row = 0;
this.textArr = [];
this.textWidth = 0;
this.textHeight = this._getTextSize(arr[0]).height;
this.textHeight = this._getTextSize(this.attrs.text).height;
var lineHeightPx = this.attrs.lineHeight * this.textHeight;
var addedToLine = true;
while(charArr.length > 0 && addedToLine && (this.attrs.height === 'auto' || lineHeightPx * (row + 1) < this.attrs.height - this.attrs.padding * 2)) {

File diff suppressed because one or more lines are too long

View File

@ -155,7 +155,7 @@ Kinetic.Text.prototype = {
var row = 0;
this.textArr = [];
this.textWidth = 0;
this.textHeight = this._getTextSize(arr[0]).height;
this.textHeight = this._getTextSize(this.attrs.text).height;
var lineHeightPx = this.attrs.lineHeight * this.textHeight;
var addedToLine = true;
while(charArr.length > 0 && addedToLine && (this.attrs.height === 'auto' || lineHeightPx * (row + 1) < this.attrs.height - this.attrs.padding * 2)) {