joel-wenzel / ng-flowchart

A lightweight Angular Library for building drag and drop flow charts. Chart behavior and steps are customizable. Data can be exported or uploaded in json format.
Apache License 2.0
141 stars 49 forks source link

Issue with vertical step reordering #77

Closed Smorior closed 1 year ago

Smorior commented 1 year ago

Hey guys, I would like to report an issue with vertical step re-ordering. After several vertical position changes you will end up with orphans with reduced opacity, with the following error:

ERROR RangeError: Maximum call stack size exceeded at get nativeElement [as nativeElement] (4.c9bbe7bd4c632b8f47af.js:1:44144) at t.showTree (4.c9bbe7bd4c632b8f47af.js:1:46263) at 4.c9bbe7bd4c632b8f47af.js:1:46344 at Array.forEach (<anonymous>) at t.showTree (4.c9bbe7bd4c632b8f47af.js:1:46330) at 4.c9bbe7bd4c632b8f47af.js:1:46344 at Array.forEach (<anonymous>) at t.showTree (4.c9bbe7bd4c632b8f47af.js:1:46330) at 4.c9bbe7bd4c632b8f47af.js:1:46344 at Array.forEach (<anonymous>)

Screenshot 2023-04-26 at 17 04 26

I suppose that some other issue causes infinite recursion during the iteration through the tree of steps which eventually throws an error. Since I was working with the old version ^1.0.0-beta.12, because this is the latest one with support for Angular 12, I was hoping that this might be resolved in some of the latest ones, but seems not. This is easy to reproduce, even on the demo.

However, I wanna say that you have created an awesome library. It has great design flexibility, it is easy to extend and works with Angular components out of the box. Great stuff! If I can help you in any way, maybe with a contribution to solve this problem or to extend the library with new features, please let me know.

Thanks!

michaelmarcuccio commented 1 year ago

I do not think this issue still occurs in the most recent version. The demo still runs on a really old version I believe.

EDIT: I found the bug. Looking into it.