Link can not move with draggable component
datavisorfrankhe opened this issue · 0 comments
datavisorfrankhe commented
Describe the bug
I am using angular drag&drop as render component, like below:
<ngx-graph *ngIf="loaded" #dvGraph [links]="edges" [nodes]="nodes">
<ng-template #nodeTemplate let-node>
<svg:g class="node" xmlns="http://www.w3.org/2000/xhtml">
<svg:foreignObject
mwlDraggable [dropData]="node"
width="160" height="42"
>
</ng-template>
<ng-template #linkTemplate let-link>
<svg:g class="edge" (click)="clickedLine(link)">
<svg:path class="line" stroke-width="1" marker-end="url(#arrow)">
</svg:path>
</svg:g>
</ng-template>
</ngx-graph>
But the problem here is if I put mwlDraggable into ng-template, then when I move the render block, the link is NOT moving at all. Seemed like the draggable is disabling the link move.
Can anyone tell me how to make the render block to be draggable and having the link to move together with the draggable block?
Thanks