@Glidias wrote:
Is there a quick way within GoJS to only allow links that are contiguously connected by selected Nodes to be copied? Otherwise, if a Link is selected in isolation from other nodes that aren't selected, they will not be copied. Because right now, i'm having an issue with isolated Links being copied and pasted into the diagram at times. If I select 2 nodes or a network of nodes that are connected by links, I can copy and paste them with their connected arcs duplicated successfully. However, if an isolated link gets selected among the list without a connecting selected node, than that link will be copied+pasted with undefined "from/to" pointers, because their related nodes weren't selected prior to the copying operation.
I know i can set
copyable
to the linkTemplate tofalse
, but that will disable copying+pasting of Links completely. However, I want to copy links that are contigously connected by other selected nodes. Mustcopyable
per Link be set/reset manually everytimeChangedSelection
is being done, and i have to perform my own manual Graph search code for each selected node to determine which arcs are copyable? Is there a manual before "pre-copy-to-clipboard/pre-paste" event that I can hook into to modify what Links gets copied or not? Short of, perhaps, manually removing isolated links after the pasting is done?.
Posts: 8
Participants: 3