d3-ternary icon indicating copy to clipboard operation
d3-ternary copied to clipboard

Improve `ternaryPlot.transform()` within bounds check

Open JulesBlm opened this issue 4 years ago • 0 comments
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.

See this demo

This GIF kind of depict how the check works. https://twitter.com/FreyaHolmer/status/1300041795670245376

JulesBlm avatar May 23 '21 22:05 JulesBlm