Has anyone here had issues with the <svg> layer in the <CanvasWidget> component getting truncated? My diagrams are rendering properly but the svg layer only fills part of my viewport and the nodes get "squished" against this invisible boundary.
For anyone else seeing similar behavior like this, it's due to CSS conflicts. Check out issue #666
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