A project is look very good.
I have to create something more like on you first images. Different types of ports and nodes.
What the best way to extend default ones?
the best way to learn how to create your own nodes is to take a look at the default folder. I do plan to make guides and docs, I just don't have too much time at the moment. But more to the point: the best way would be to create your own NodeModel (like MyNewNodeModel extends NodeModel) and then to register a WidgetFactory that knows how to render that type. I will provide a 'demo3' folder now that shows how to create custom nodes and models. In the mean time, please check out https://github.com/mwozniczak/adventure-weave by @mwozniczak who has been pushing me for quite a few of these things (thanks @mwozniczak for all the support thus far :) ). I am also willing to help on bitter if you need some assistance :)
I just added a demo3 folder which shows a more complex example on how to really extend this library as intended, it created a diamond node, that has 4 inputs at each corner.
Awesome, thanks!
My $0.02, since I've been called in:
Basically, what's core to understanding the lib (and feel free to correct me @dylanvorster, I'm still kinda learning it :D) is this:
getDiagramModel() or just substitute your own. This is where you'll add factories that are what binds models and widgets together.generateReactWidget method to actually deliver the widget. Do note, so as not to make my mistake, that multiple nodels can have the same type, with the logic dedicated to deciding which widget to pick might be delegated elsewhere: to the factory, or where have you.Apologies if the above is _too_ ranting and chaotic, I've scarcely had any sleep last night :D
Anyway, if you have any questions, don't hesitate to ask them, @gen4sp (or anyone i suppose) :)
I kind of one to pin this until I can get some guides going o_o
Well, by all means :D
Most helpful comment
My $0.02, since I've been called in:
Basically, what's core to understanding the lib (and feel free to correct me @dylanvorster, I'm still kinda learning it :D) is this:
getDiagramModel()or just substitute your own. This is where you'll add factories that are what binds models and widgets together.generateReactWidgetmethod to actually deliver the widget. Do note, so as not to make my mistake, that multiple nodels can have the same type, with the logic dedicated to deciding which widget to pick might be delegated elsewhere: to the factory, or where have you.Apologies if the above is _too_ ranting and chaotic, I've scarcely had any sleep last night :D
Anyway, if you have any questions, don't hesitate to ask them, @gen4sp (or anyone i suppose) :)