Polyline class does not have a UniquePolylineProps interface #10075
-
Most of the classes in Fabric (e.g., Rect) appear to use a Unique*Props interface to list out the properties that the class provides (e.g., rx, ry in Rect). But Polyline seems to separate the points out of Props. Is this intentional since points is a constructor parameter? I'm wondering if my subclass should be trying to include points in the Props or if it should just extend FabricObjectProps only. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
What is the issue you are facing? If you prefer to move the position of points from first argument to a generic key in the object you should also write your own fromObject method. |
Beta Was this translation helpful? Give feedback.
What is the issue you are facing?
As long as you are able to clearly see the points in the type when the object is serialized and if you can pass them as first argument of the constructor, that should be good.
If you prefer to move the position of points from first argument to a generic key in the object you should also write your own fromObject method.