Replies: 1 comment 3 replies
-
Hi @micrology i think the fact that the fromObject is missing and that the type is still rect, may throw off deserialization. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
CheckList
Version
5.2.4
In What environments are you experiencing the problem?
Chrome
Node Version (if applicable)
18.0.0
Link To Reproduction
https://jsfiddle.net/uvjk0haf/
Steps To Reproduce
Run the template https://jsfiddle.net/uvjk0haf/
See also unanswered query on StackOverflow https://stackoverflow.com/questions/74205399/fabricjs-cloning-a-subclassed-object-makes-the-clone-invisible
Expected Behavior
If you create a subclass of e.g. a rect, then clone it, the clone is not visible. This is shown in the JSFiddle, where running the example displays 3 rectangles, two red but only one yellow. There should be 2 yellow rectangles.
Actual Behavior
In the JSFiddle, there should be four rects displayed, two red and two yellow. The missing yellow rect is a cloned subclass of Rect.
Error Message & Stack Trace
No response
Beta Was this translation helpful? Give feedback.
All reactions