-
-
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
[Bug]: Loading canvas object with path on Itext #8865
Comments
I am guessing the path doesn't get enlivened which is weird |
fixed in v6 |
yes this is fixed in v6 but the bug was on 5.3 indeed, this needs to be fixed |
Can you please tell what changes we need to do here. I am trying to make undo redo on canvas but when I do something like first setting path and then trying to move object and then press undo, I am getting this error. I am also getting this with Text object also, and not just only with IText. I am using 5.3.0. For time being, I was temporarily able to fix by adding
|
Same here, after moving the object and click undo, then the error comes. I try your solution shashank-brightness but the object disapears. |
@Jonnas123 You can fix this by giving path object the protorype of the path when you need to again attach to the object. It disappears in above code as i am always returning true from
|
@shashank-brightness I've checked again. For my case it happens only with IText. No error if I use Text property. Here is a demonstration. The left one is IText, you can see it can be double clicked and placed the cursor inside (not normal behavour) while the right one is Text , which works without this error. If you don't mind telling me how to put
|
I think we said there was a bug in 5.x that doesn't allow to enlive that back. |
Yes this should be fixed should be also easy to fix |
hey @asturur still didn't got you. This is how I am generating curved text After that, I export the json. This is the sample json when imported gives this error:-
|
i ll try to get back to you monday i didn't have time to handle it |
sure sure, no worries, take your time. Enjoy!! |
So the reason why it doesn't load correctly is that we added the restore code to Text and not IText or Textbox and i think the reason is because interactivity at this point is still broken. |
Yeah, that would be so helpful. |
5.4.0 will be released just to punch in a bunch of broken things we noticed
while working on v6
All next work will be v6 onward.
Il giorno mer 1 mag 2024 alle ore 04:45 Shivam Chauhan <
***@***.***> ha scritto:
… Also, @asturur <https://github.com/asturur> 1 question, will 5.4.0 be
realeased as beta or LTS version.
I am new to open source and don't know how this works or what rules you
use in this community. If you can guide me to a ruleset (if we have one)
would be helpful. Might encourage me to do some contributions also in
future.
—
Reply to this email directly, view it on GitHub
<#8865 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJDQQFKGFC4WOWD56FTDQ3ZABJMHAVCNFSM6AAAAAAXM64QVSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBXHA4TKMZSGE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hey please check if this build fix this issue: |
@asturur thanks for the fix, exporting/importing canvas that contains text on a path is working now 👍 |
Hey @asturur thanks, this works like a charm 🫡 |
CheckList
Version
5.3.0
In What environments are you experiencing the problem?
Firefox, Chrome, Safari
Node Version (if applicable)
None
Link To Reproduction
https://jsfiddle.net/aj5bueot/
Steps To Reproduce
There is a bug when you reload a canvas object that includes an Itext Object with a path parameter. It does work with fabric.Text.
Bug is inside _render method of fabric.Text:
path && !path.isNotVisible() && path._render(ctx);
Expected Behavior
No bug in console.
Actual Behavior
Throwing a TypeError.
Error Message & Stack Trace
The text was updated successfully, but these errors were encountered: