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

Conversation

DangerD256
Copy link
Contributor

@DangerD256 DangerD256 commented Jan 17, 2018

closes #4625

@@ -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.

?

@asturur
Copy link
Member

asturur commented Jan 17, 2018

@DangerD256 do you think you can make this correction?

Copy link
Member

@asturur asturur left a comment

Choose a reason for hiding this comment

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

Please update the patternTransform export

@asturur asturur merged commit 8792d83 into fabricjs:master Jan 17, 2018
thiagocunha pushed a commit to thiagocunha/fabric.js that referenced this pull request Nov 18, 2019
* Add patternTransform toObject saving
* Update pattern.class.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

patternTransform not saving via canvas.toJSON
3 participants