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
Applied Mask Adjustments on Two.Path
  • Loading branch information
jonobr1 committed Nov 24, 2021
commit f510d29f4841115fd9ac990df2c05c5eac846a77
12 changes: 12 additions & 0 deletions src/path.js
Original file line number Diff line number Diff line change
Expand Up @@ -838,6 +838,13 @@ _.extend(Path.prototype, Shape.prototype, {
v.y += hh;
}

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

return this;

},
Expand All @@ -860,6 +867,11 @@ _.extend(Path.prototype, Shape.prototype, {
v.y -= cy;
}

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

return this;

},
Expand Down