MrBlenny / react-flow-chart

🌊 A flexible, stateless, declarative flow chart library for react.
https://mrblenny.github.io/react-flow-chart/index.html
MIT License
1.46k stars 307 forks source link

Link Move errors #130

Closed davidanitoiu closed 4 years ago

davidanitoiu commented 4 years ago

Hi,

I moved to the 0.0.12 today and had some errors coming up with my existing code. I haven't done any changes in-between and even tried going back to 0.0.11 and the errors are gone. So it must be related with the last merge.

The error occurs when I try to create a new link.

image

image

lorienberne commented 4 years ago

Hello! I managed to fix this by adding a scale param to the chart object.

const chart = {
    scale: 1,
    offset: {...},
    nodes: {...},
    links: {...},
    ...
}
davidanitoiu commented 4 years ago

Well I'll be...

that was it :)

I had some nasty CSS done on my side to get the custom colors, because of this thing. Now I can use the sweet new linkColors property.

Thank you!