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 code to restore saved clipPath #5641

Merged
merged 1 commit into from
May 19, 2019
Merged

add code to restore saved clipPath #5641

merged 1 commit into from
May 19, 2019

Conversation

AlexSergey
Copy link
Contributor

After I saved example 8 from clipPath:
http://fabricjs.com/clippath-part3
"Clipping the canvas"
I tried to restore it from loadFromJSON. But in this method isn't process clip path. I added some code to fix it.

@asturur
Copy link
Member

asturur commented Apr 18, 2019

didn't we fix this recently? i remember a pr about this.

@AlexSergey
Copy link
Contributor Author

I found only save fix, where it was replaced from:
data.clipPath = this._toObjectMethod(clipPath, methodName, propertiesToInclude);
to:
data.clipPath = this._toObject(clipPath, methodName, propertiesToInclude);

But restore method is not support clipPath restore to the canvas.

@asturur
Copy link
Member

asturur commented Apr 18, 2019

great. i ll look at it soon.

@asturur
Copy link
Member

asturur commented May 3, 2019

i want to merge it, but i would like a test too. trying to add it tomorrow since i want to head to a release

@asturur
Copy link
Member

asturur commented May 19, 2019

ok merging it!
i ll add tests in a pr shortly

@asturur asturur merged commit 43de9c3 into fabricjs:master May 19, 2019
thiagocunha pushed a commit to thiagocunha/fabric.js that referenced this pull request Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants