projectstorm / react-diagrams

a super simple, no-nonsense diagramming library written in react that just works
https://projectstorm.cloud/react-diagrams
MIT License
8.6k stars 1.17k forks source link

Fixed failing tests in CircleCI & fixing a typo #736

Closed adaladam closed 3 years ago

adaladam commented 3 years ago

Checklist

What?

Fixed typo in packages/react-diagrams-core/src/models/DiagramModel.ts and failing tests in CircleCI

Why?

1) packages/react-diagrams-core/src/models/DiagramModel.ts had a typo. NodeLayerModel was used when getting active link layer instead of LinkLayerModel

2) Tests were failing because of iframe.html has body padding set to 1rem. Because of that page.mouse.down svg based coordinates were missing the target path

How?

1) Fixed typo

2) Using getClientRects() instead of svg getPointAtLength()

Feel good image:

LOL