You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I understand, the root of the problem is that the corner-case formula is only used when the xy coordinates of the inputs are exactly the same, but there occurs a rounding problem in Math.log(Math.sqrt(b0 * b0 + 1) - b0) when they are nearly the same.
Activity
cie commentedon Oct 7, 2015
I use a workaround now:
Like this:
With this I couldn't reproduce the NaN's. However, I don't know whether this will disturb the normal zoom-and-pan behaviour.
mbostock commentedon Oct 9, 2015
Probably it would be sufficient to change the
if (dr) {in the interpolate function toif (dr > ε) {.cie commentedon Oct 10, 2015
Not really, because
drcan be NaN (ifux1==ux0 && uy1==uy0thend1==0, and thenb0andb1is NaN).cie commentedon Oct 10, 2015
Maybe better
!isNaN(dr) && dr > ε.Fix interpolateZoom when u0 ≅ u1.
Fix #2575 - zoom interpolation when u0 ≅ u1.
mbostock commentedon Oct 23, 2015
Fix staged for 3.5.7 in #2591.