Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed Text object -> ITextObject (fix #262 #109) #352

Merged
merged 4 commits into from
Jun 16, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'master' into fix/textBugAtItextMode
  • Loading branch information
jinwoo-kim-nhn committed Jun 10, 2020
commit 50e05fe37ad04d2c6ebd9bf411da647b623da585
14 changes: 2 additions & 12 deletions src/js/component/text.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,7 @@ class Text extends Component {

canvas.forEachObject(obj => {
if (obj.type === 'i-text') {
obj.set({
left: obj.left - (obj.width / 2),
top: obj.top - (obj.height / 2),
originX: 'left',
originY: 'top'
});
this.adjustOriginPosition(obj, 'start');
}
});

Expand All @@ -144,12 +139,7 @@ class Text extends Component {
if (obj.text === '') {
canvas.remove(obj);
} else {
obj.set({
left: obj.left + (obj.width / 2),
top: obj.top + (obj.height / 2),
originX: 'center',
originY: 'center'
});
this.adjustOriginPosition(obj, 'end');
}
}
});
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.