gwenaelp / vue-diagrams

Diagram component for vue.js, inspired by react-diagrams
MIT License
285 stars 64 forks source link

fix(diagramlink): populate `positionFrom` and `positionTo` #13

Open TonyMasse opened 3 years ago

TonyMasse commented 3 years ago

with {x:0, y:0} in DiagramModel.addLink(). To prevent error message when new link is created. As the link's curve cannot otherwise be drawn properly (as no x nor y yet defined for positionFrom and positionTo) until the first call to updateLinksPositions().

Close #6

What kind of change does this PR introduce? (check at least one)

Does this PR introduce a breaking change? (check one)

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

If adding a new feature, the PR's description includes:

Other information:

Problem was caused by DiagramModel.addLink() that was pushing a Link with empty positionFrom and positionTo.