-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Fix the spell error which makes the gradientTransform doesn't work #7059
Conversation
Just fix the spell error in the source files, which may cause the gradientTransform doesn't work at some condition. |
hi @corleone113. Thanks for the fix. Could you please try to add a test? If you need help to write it i can help, but you can find here examples: |
Hi @asturur. |
@corleone113 the test can be added in the existing file with other tests. Otherwise i have to add this new file to the website and is extra work. The generic render file is good enough ( the one i linked ). The other important thing is that your test is sort of invalid. look how this test is defined: fabric.js/test/visual/generic_rendering.js Line 209 in 5c4c957
|
test/visual/generic_rendering.js
Outdated
function gradientStroke(canvas, callback) { | ||
var line = new fabric.Line([10, 10, 200, 200], { | ||
stroke: { | ||
toLive(ctx) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this stroke: { toLive: .... } the correct form, as you can see in other tests is:
var line = new fabric.Line([10, 10, 200, 200], {
stroke: new fabric.Gradient({ ... options })
})
I'm sorry for not replying in time and thank you for your guidance.I have some other things to do, so I can only fix these errors later.
…---Original---
From: "Andrea ***@***.***>
Date: Mon, May 17, 2021 19:17 PM
To: ***@***.***>;
Cc: "corleone ***@***.******@***.***>;
Subject: Re: [fabricjs/fabric.js] Fix the spell error which makes the gradientTransform doesn't work (#7059)
@asturur commented on this pull request.
In test/visual/generic_rendering.js:
> @@ -361,5 +361,112 @@ height: 100, }); + function gradientStroke(canvas, callback) { +var line = new fabric.Line([10, 10, 200, 200], { +stroke: { +toLive(ctx) {
please remove this stroke: { toLive: .... } the correct form, as you can see in other tests is:
var line = new fabric.Line([10, 10, 200, 200], { stroke: new fabric.Gradient({ ... options }) })
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I've fixed the invalid test codes, please review again. |
Code looks good, i need to validate the test manually the text test seems too small to fail with a 9% rate. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
No description provided.