I am trying to build application based on JointJS and Angular 5. I am trying to create element with ports using joint.shapes.devs.Model
. The main problem is with extending. I need to create basic class of the element and then inherit it in sub classes.
When i am using define
, for example: BasicElement = joint.shapes.devs.Model.define(...)
and then i am trying to extend it with SomeElement = BasicElement .define(...)
i am getting a TypeScript error Property 'define' does not exist on type 'Constructor<Element>'.
I also tried to make it in class-oriented way and then extends it like:
class BasicElement extends joint.shapes.devs.Model {
markup = <g class="scalable">
<rect class="body"/>
</g>;
inPorts = ['in'],
ports = { ... }
}
But it didn't work. How could i achieve class-oriented inheritance for element with ports? Thank you