ERROR in ../react-canvas-core/dist/index.js Module not found: Error: Can't resolve '@projectstorm/geometry'
@loucarpe_gitlab did you figure this out? I am looking for similar example!
@imaGuru Could you point me to your solution please?
@Fulguritude_gitlab my solution was to override canvas widget and make it so that click is attached to the whole document instead of just the diagram. Then I modified the state machine handling input to check whether someone clicked outside of the canvas. If so I remove selection, so there is nothing to delete even if the buttons are pressed. Another way would be to unregister default delete action and add a new state checking onbulr o focus event and transitioning to a state with delete capabilities depending on that
@ajthinking thanks.. Although that is completely unintuitive and is quickly going to annoy my users. Clicking should select and delete should delete the selected item. Shift click would be appropriate to add positioning nodes along the link. Any idea where I could find the event bindings or examples on how to change them to implement something similar to what I describe?
Agreee - the opposite would make more sense
HistoryBankwhich enables an undo and redo via
engine.getHistoryBank().goForward();. Is this available in react-diagrams as well? And how do I access the HistoryBank?
canLinkToPortto my component containing the
Hi @ygrossm, cool idea! Not sure I will be able to assist very well as Im new to TS.
Anyways, I did implement a similar dynamic port thing, where ports are created from an array. Maybe you can find some inspiration there (even though its not perfect)
Also shouldn't you be using your own models? In the factory and a few other places you refer to the default models?
Good luck :)
Huh, just discovered that PostgreSQL pgAdmin4 project uses react-diagrams hehe
Hi all! Quick (fairly common I bet) question...
Thanks in advance!
Let's say i have a two nodes Node1 and Node2, and both the node are connected with default link (link1). Now i also have another node named as Node3, which is not connected to any link.
When dragging Node3 and drop on link1, Node3 should placed between Node1 and Node2 and connected to link1.
How to achieve this. Please help me.