From 8683de1d50ca6e8f1ee5d548c8fabe04ff3833dc Mon Sep 17 00:00:00 2001 From: Jeshurun Hembd <41167620+jjhembd@users.noreply.github.com> Date: Thu, 3 Mar 2022 19:04:55 -0600 Subject: [PATCH] Avoid negative duration in interpolateZoom --- src/zoom.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zoom.js b/src/zoom.js index f275602..baebf7e 100644 --- a/src/zoom.js +++ b/src/zoom.js @@ -57,7 +57,7 @@ export default (function zoomRho(rho, rho2, rho4) { } } - i.duration = S * 1000 * rho / Math.SQRT2; + i.duration = Math.abs(S) * 1000 * rho / Math.SQRT2; return i; }