This was generated using the Natural Earth data set, which has nicer
simplification than my previous approach using MapShaper. Also, this includes
some updated boundaries, such as the split between Sudan and South Sudan. And,
counties now have ISO 3166-1 alpha-3 codes.
There is also a greatCircle as an alias, whose angle defaults to 90 degrees. (Or
should, but some projections cannot handle 90 degrees so we use 89 instead.)
This also tweaks the array conversion slightly so that it is called by
selection.selectAll rather than d3_selectAll; this guarantees that the selection
groups are always arrays, even when a function selector is used.
The greatArc class is the new name for greatCircle, which actually represents
great arcs. Meanwhile, a new greatCircle class is for great circles. The new
greatCircle class replaces the old clip class, providing clipping and resampling
functionality (using greatArc internally). This isn't backwards-compatible, but
I may forgo the major version number bump in light of the fact that greatCircle
was just added, and not used in any (official) examples or documented.
Note that the Werner projection is a special case with standard parallel
at 90°N, and the Sinusoidal projection is also a special case with
standard parallel at 0°N.
The click event is prevented from propagating when a drag has occurred
i.e. the mouse has moved between mousedown and mouseup. This is because
a click event will be triggered after a mousedown and mouseup have
occurred on the same element. However, we were cancelling the next
click event *anywhere*, regardless of whether mousedown and mouseup
occurred on the same element or not.
As a sanity check, we also check that the click event was triggered on
the same element that mousedown *and* mouseup occurred on, before
cancelling it. Just in case!
This adds support for filtering the log ticks, such that fewer ticks can be
generated to fit in a small space. This can be used in conjunction with a
custom tick format as well. This commit also changes the default log tick format
to be exponential rather than precision, for consistency.
We were registering multiple tick listeners, rather than replacing it. Oops!
In the future, we'll probably change the behavior of force.on to match
selection.on, and require a namespace for registering multiple listeners.