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

Possible to Delete Masks by Setting Property to Null #567

Merged
merged 8 commits into from
Nov 24, 2021
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
Next Next commit
Incorporate Masks in Corner and Center Methods
  • Loading branch information
jonobr1 committed Nov 24, 2021
commit 694c736a397ffce90c041c6aba5ce1d45942fce5
10 changes: 10 additions & 0 deletions src/group.js
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,11 @@ _.extend(Group.prototype, Shape.prototype, {
child.translation.y -= rect.top;
}

if (this.mask) {
this.mask.translation.x -= rect.left;
this.mask.translation.y -= rect.top;
}

return this;

},
Expand All @@ -590,6 +595,11 @@ _.extend(Group.prototype, Shape.prototype, {
}
}

if (this.mask) {
this.mask.translation.x -= cx;
this.mask.translation.y -= cy;
}

return this;

},
Expand Down