d3-ternary
d3-ternary copied to clipboard
Improve `ternaryPlot.transform()` within bounds check
trafficstars
Calling .transform() performs a check if the newly transformed vertices are within bounds of the initial triangle. Occasionally something goes wrong and zooming becomes very jumpy, especially when dragging the transformed triangle near the vertices of the initial triangle.
This GIF kind of depict how the check works. https://twitter.com/FreyaHolmer/status/1300041795670245376