Now you can say d3.time.seconds(start, stop, step), which will return every
step'th second after start (inclusive) and before stop (exclusive). In addition,
you can now pass a range method to the time scale's ticks method, which makes it
easier to generate ticks. For example, x.ticks(d3.time.seconds, 15) will return
15-second ticks, rather than using the automatic default.
Previously, negative or zero sizes were short-circuiting the worst()
function by always returning Infinity, instead of being ignored for the
score computation.
Fixes#233.
For very large force layouts, Safari was throwing "RangeError: Maximum call
stack size exceeded". I think this is due to Safari having a smaller call stack
than Chrome and FireFox. In any case, this fix replaces forEach with a while
loop, which should be faster in all browsers as well as reducing the call stack
size needed and thus fixing the Safari issue.
Instead of filtering them out, we fix the root of the issue instead, which is
that the scoring function "worst" was returning NaN due to calculating 0/0,
instead of Infinity.
This includes nearly a complete rewrite of d3.behavior.zoom, more closely
modeled after the Polymaps po.drag, po.touch and po.wheel classes. This makes
the code simpler and also fixes a bug when releasing one of two fingers.
I simplified the implementation to only support single-touch. I also opted not
to include touch support in the force-dynamic example (and other examples), just
because it complicates the examples too much. Touch is nice but I don't want it
to interfere with people learning the basics.
This merge also has an extra bonus fix: you can now have multiple force layouts
with dragging on the same page, and the drag behavior will do the direct the
event to the appropriate force layout.