Is it possible to add support for selecting edges? Something like this:
{{visjs-edge eId=edge.id from=1 to=2 select=(action 'edgeClicked')}}
So that the action can take the edge-id (eID) as first paramerer if set.
I think this should be enough is visjs-network.js:
network.on('selectEdge', (e) => { let [ selectedEdge ] = e.edges; let matchingChildEdge = _this.get('_childLayers').find((c) => { return '${c.get('eId')}' === '${selectedEdge}'; }); if (matchingChildEdge) { matchingChildEdge.get('select')(selectedEdge, e); } });
I can send a pull request if the feature is wanted. Thanks for a great addon.
Is it possible to add support for selecting edges? Something like this:
{{visjs-edge eId=edge.id from=1 to=2 select=(action 'edgeClicked')}}So that the action can take the edge-id (eID) as first paramerer if set.
I think this should be enough is visjs-network.js:
network.on('selectEdge', (e) => { let [ selectedEdge ] = e.edges; let matchingChildEdge = _this.get('_childLayers').find((c) => { return '${c.get('eId')}' === '${selectedEdge}'; }); if (matchingChildEdge) { matchingChildEdge.get('select')(selectedEdge, e); } });I can send a pull request if the feature is wanted. Thanks for a great addon.