Skip to content

Commit

Permalink
stop searching target on mousemove on transform (fabricjs#4442)
Browse files Browse the repository at this point in the history
  • Loading branch information
asturur authored Nov 8, 2017
1 parent a700bd1 commit 8d59634
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mixins/canvas_events.mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@
else {
this._transformObject(e);
}
this._handleEvent(e, 'move', target);
this._handleEvent(e, 'move', this._currentTransform ? null : target);
},

/**
Expand Down
5 changes: 4 additions & 1 deletion src/shapes/text.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -853,8 +853,11 @@
charBox = this.__charBounds[lineIndex][i];
if (boxWidth === 0) {
left += charBox.kernedWidth - charBox.width;
boxWidth += charBox.width;
}
else {
boxWidth += charBox.kernedWidth;
}
boxWidth += charBox.kernedWidth;
if (this.textAlign === 'justify' && !timeToRender) {
if (this._reSpaceAndTab.test(line[i])) {
timeToRender = true;
Expand Down

0 comments on commit 8d59634

Please sign in to comment.