Skip to content

duplicated edges (edges removed in UI) when using a custom layout (DagreNodesOnlyLayout) #605

@cmgchess

Description

@cmgchess

Describe the bug
I'm using the custom DagreNodesOnlyLayout based on this stackblitz.
I have a list of graphs and I switch between the 2 graphs.
I noticed that some edges are missing and when I checked in the html I can see that the number of edges is correct but edges are duplicated and therefore from the UI it looks like edges are missing.
By the way it seems to happen when I transition from a graph to another and when using a custom layout. Everything looks fine in the initial load.

Edit
even tested with this as well customDagreNodesOnly.ts
but the issue persists

To Reproduce
Steps to reproduce the behavior:

  1. Go to demo
  2. Select 'Scenario 2'

Expected behavior
Graph supposed to look with all edges like

Image

Screenshots
Image

what it looks like

Image

Demo
https://stackblitz.com/edit/playground-angular-17-material-nsu3nd-u5bmtrxb?file=src%2Fapp%2FdagreNodesOnly.ts

ngx-graph version
9.0.1

Additional context
Angular 17

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions