flekschas / regl-scatterplot

Scalable WebGL-based scatter plot library build with Regl
https://flekschas.github.io/regl-scatterplot/
MIT License
191 stars 24 forks source link

fix: drawing a single connecting line between points #141

Closed flekschas closed 1 year ago

flekschas commented 1 year ago

This PR ensures that a single line connecting all points is drawn correctly.

Description

What was changed in this pull request?

Previously, when one attempted to draw a single point connection that connects all points, no line would be drawn. This is now working.

As part of this fix, I also fixed the draw() functions resolution to await the drawing of point connections (when showPointConnections is set to true). Previously, draw() would resolve as soon as the points were drawn but drawing lines typically takes longer. Hence, draw() resolved too early. With this PR, when showPointConnections is true, draw() will resolve after both, the points and the connections, have been drawn.

Why is it necessary?

Fixes #125

Checklist