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

Add patternTransform toObject saving #4626

Merged
merged 2 commits into from
Jan 17, 2018
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
1 change: 1 addition & 0 deletions src/pattern.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
repeat: this.repeat,
offsetX: toFixed(this.offsetX, NUM_FRACTION_DIGITS),
offsetY: toFixed(this.offsetY, NUM_FRACTION_DIGITS),
patternTransform: this.patternTransform
Copy link
Member

@asturur asturur Jan 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

patternTransform: this. patternTransform ? this. patternTransform.concat() : null
this allow to avoid sending out a reference to the real matrix that could be changed by other function later.
A sort of shallow protection on mutations.

You do not expect your object to to influence rendering once exported.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great version ( at this version you broke video scalling ;))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

};
fabric.util.populateWithProperties(this, object, propertiesToInclude);

Expand Down