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

Positioning bugs out on changing size of steps. #89

Closed mostafahassaan closed 1 year ago

mostafahassaan commented 1 year ago

I'm having this issue that i would greatly appreciate some help with. I'm using a custom step extending NgFlowchartStepComponent, the component looks as so to start with

Screenshot 2023-10-05 121559

After adding some elements to said component it resizes to fill these elements. However it's positioning gets misaligned as so

Screenshot 2023-10-05 121709

Moving the step fixes alignment.

Screenshot 2023-10-05 121735

I've tried calling reRender on canvas when the size changes however i can not seem to fix it. How can I fix this without moving the step?

michaelmarcuccio commented 1 year ago

Not that it helps you resolve the problem, but this has always been an issue. Without some sort of fix, it is recommended to keep your steps the same size once rendered.

mostafahassaan commented 1 year ago

Understood. However, a call to NgFlowchartCanvasDirective.getFlow().render() re-renders the page correctly. Is it not possible to detect step size changes?