Hi,
I'm trying to update the curves of the connectors to look more like this
instead of this which is the default
this is what I'm trying but so far I haven't been able to get it to update it at all
what's commented is what's not working, everything else is working
thanks
Hi Reuvain
We have created a sample for Bezier connector with vector points. On analyzing the provided code snippet you have set the sourceID and targetID inside connector’s segment property, so that issue may occur. We want to only define sourcePortID and targetPortID for connector and inside segment property we only define type and vector. Please refer to the below code snippet and sample
|
{ id: 'connector1', type: 'Bezier', segments: [ { type: 'Bezier', vector1: { distance: 30, angle: 90 }, vector2: { distance: 30, angle: 270 }, }, ], sourceID: 'node1', targetID: 'node2', }, |
Sample: https://stackblitz.com/edit/angular-hbq2tr?file=app.component.ts
Regards
Aravind Ravi
Hi Aravind,
Thank you, I tried what you suggested and it's not working.
It doesn't seem to be applying any change.
I'm trying to do this in the function that I'm passing to the diagram to use as the default connector builder, is it possibly to apply such changes to all the connectors together?
thanks
I got it working together with the answer from Aravind Ravi.
From the created event I updated the connectors directly and then it worked.
<ejs-diagram #diagram (created)="updateConnectors()"> </ejs-diagram>
Thank you!
Hi Reuvain,
Most welcome.
Regards
Aravind Ravi