fabric.js : 6.3.0 : How to register custom class (created by extending the fabric object) to the fabric. #10129
Unanswered
niketaOptimumnbrew
asked this question in
Q&A
Replies: 1 comment 5 replies
-
this is not a part of the fabric module, so what you ask is not possible and also does not make sense. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I have created a custom class using createClass, but it has been removed in the latest version, so I am now creating it with extend. I have created the class with extend, but the problem is that I need to export that class and use it like this: new customclass();
I want to use it like fabric.customclass();
I've created js file for custom class and imported custom class in ts file of angular.
Here is the code that I've done:
`import * as fabric from 'fabric';
export class CurvedText extends fabric.FabricObject {
static type = 'curved-text';
}`
Is there any way to solve this problem? Please help. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions