Граф коммитов

12 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock 06ecb617a2 Allow multiple zoom behaviors to coexist.
Any event handlers on the window need to manage global state, as they will be
replaced when another zoom behavior is created.
2011-07-10 10:31:52 -07:00
Mike Bostock c1d7fbc172 Merge branch 'touch' into release
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.
2011-07-09 20:30:14 -07:00
Mike Bostock 629b13d806 Merge @ignacioola's fix. 2011-07-08 22:42:26 -07:00
Ignacio 9b52078894 zoom bug: function and var with same name 2011-07-07 12:47:36 -03:00
Mike Bostock 4f16bbd9e7 Regenerate files. 2011-06-13 17:30:30 -07:00
Mike Bostock 6c5a1a3b0e Rewrite mousewheel hack using D3.
Also, make sure that the div is positioned absolutely off-screen.
2011-05-30 09:22:28 -07:00
Jason Davies a59683e325 Better mousewheel precision.
Copy Mike's new mousewheel hack from Polymaps.

Fixes #156.
2011-05-30 10:09:53 +01:00
Jason Davies c29a121687 Add touch (zoom) support to d3.behavior.zoom.
Double-tap zooms into the next integer zoom level.  Two-finger pinch zooms in
and out, while panning simultaneously.

Implementation inspired by Polymaps.
2011-05-13 19:17:00 +01:00
Jason Davies 2d98bf10a4 Add touch (pan) support to d3.behavior.zoom. 2011-05-13 14:28:44 +01:00
Jason Davies 6827da7ec9 Regenerate files. 2011-05-01 23:31:25 +01:00
Mike Bostock 674ededfa1 Fix accidental global. Thanks, @fponticelli! 2011-04-09 11:23:53 -07:00
Michael Bostock d215acef78 Add d3.behavior module.
Includes, as the first behavior, a pan & zoom behavior. The canvas can be panned
by dragging the mouse, and zoomed using the mousewheel (or by double-click). By
listening to redraw events, users can decide whether to implement geometric
zooming (such as by setting the "transform" attribute on an `svg:g` element) or
semantic zooming (by changing the domain of a scale object and repositioning
elements).

This commit also includes two bug fixes. The `d3.format` class now properly
groups thousands of negative numbers, and supports the sign specifier. The
unicode minus symbol \u2212 is used for negative values. The `d3.scale.pow`
class now properly handles negative numbers, as well.
2011-02-11 13:00:41 -08:00