ERROR in ../react-canvas-core/dist/index.js
Module not found: Error: Can't resolve '@projectstorm/geometry'
Hey, I am looking for a concrete example of a Custom Node with a background image I can choose, like a PNG Icon, I tried some different things to get it done and my research lead nowhere so far. I am kind of new to TypeScript and JavaScript, may be that's why I can't see the way right now. Thanks for your answers =D
@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
HistoryBank
which enables an undo and redo via engine.getHistoryBank().goForward();
. Is this available in react-diagrams as well? And how do I access the HistoryBank?
canLinkToPort
to my component containing the CanvasWidget
?
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!