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

1406 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock 2df8c62c14 Merge branch 'fix-dispatch' 2011-11-22 14:38:43 -08:00
Mike Bostock 1b3a3b3cb3 dispatch.on(name) returns the current listener.
Fixes #383. This includes a non-backwards-compatible change to d3.rebind, so as
to make it easier to rebind multiple methods on subclasses.
2011-11-22 14:36:09 -08:00
Mike Bostock 75ddc28368 Fix a bug when removing a shared listener.
Previously, each listener function had a private _on property which recorded
whether the listener was enabled; this was set to false when the listener was
removed. (This is necessary because of the copy-on-write semantics when the
array of listeners is modified while events are being dispatched.) If the
listener was registered for multiple event types ("foo" and "bar") then removing
the listener for any type would disable it for all types.

The fix is to wrap the listener in an object. This also has better encapsulation
since the state is kept private.
2011-11-22 13:08:55 -08:00
Mike Bostock 5d57fa73a5 Add .npmignore. 2011-11-18 16:52:35 -08:00
Mike Bostock b04112af83 Merge branch 'release' 2011-11-16 13:55:11 -08:00
Mike Bostock b4c6b00eb2 Merge branch 'transform' into release 2011-11-16 13:54:20 -08:00
Mike Bostock 64c4e787e2 Merge branch 'master' into log 2011-11-16 13:53:28 -08:00
Mike Bostock 3007db2f43 Slightly smaller code. 2011-11-16 13:45:28 -08:00
Jason Davies 0ad865fa5d Bump epsilon. 2011-11-16 21:23:33 +00:00
Jason Davies 204506cfb9 Fix d3.transform and add browser-based tests.
This fixes various corner cases involving negative and zero scales, as
well as proper support for skewX, which previously wasn't being computed
correctly.

Fixes #377.
2011-11-16 21:16:14 +00:00
Mike Bostock faec4c8bef Stop propagation on drag start, too. 2011-11-15 17:17:05 -08:00
Mike Bostock 88c6f28a8e Merge branch 'master' into drag 2011-11-15 17:16:26 -08:00
Mike Bostock 7fe3ae4183 Fix a couple bugs with transforms.
We need to check the matrix determinant for flipped coordinates. We also need to
check for invalid transforms, which are now treated as the identity transform.
2011-11-14 16:07:11 -08:00
Mike Bostock 4090261597 Merge branch 'master' of github.com:mbostock/d3 2011-11-14 07:59:11 -08:00
Mike Bostock 98b6abd484 Improvements to collapsible force example. 2011-11-13 18:28:09 -08:00
Mike Bostock 2f16227ebd Restore conservative click canceling.
See #312. The also fixes the zoom behavior so that it cleans up temporary state
when the zoom gesture is done. And, it fixes both behaviors such that the
mouseup event is always stopped from propagation if a gesture occurs (even if a
subsequent click is not prevented).
2011-11-10 15:46:07 -08:00
Mike Bostock 18dcad7438 Add drag.origin accessor.
This allows you to specify how the drag behavior should infer the current
position of the targetted element, such that a fixed offset can be maintained
between the mouse position and the element position for the duration of the drag
gesture. For example, if your data is an {x, y} object, use origin(Object).
2011-11-10 15:16:46 -08:00
Mike Bostock 3de298bc37 Fixed precision for the default log tick format.
Also add @jmarca's test case.
2011-11-10 12:35:09 -08:00
Mike Bostock da47ae88bd Remove spurious rounding. 2011-11-10 12:31:54 -08:00
Mike Bostock 5ae34aa9a0 Merge pull request #371 from jasondavies/deps
Update JSDOM and Vows versions (Node.js v0.6.x compatibility).
2011-11-09 11:29:27 -08:00
Jason Davies 4d6b5bc342 Update JSDOM and Vows versions.
This required changing assert.length to assert.lengthOf in tests, due to
a Vows.js change to be compatible with Node.js v0.6.x.  For further
details:

    https://github.com/cloudhead/vows/pull/141
2011-11-09 19:19:15 +00:00
Mike Bostock af5fccdca1 Use inclusive bounds for brush examples. 2011-11-04 19:42:59 -07:00
Mike Bostock 8cba1d7e1c Merge branch '2.5.0' 2011-11-04 19:36:50 -07:00
Mike Bostock 7ae28f192a Merge branch 'transform' into 2.5.0 2011-11-04 19:06:43 -07:00
Mike Bostock 9460e7f175 Add transform transition example. 2011-11-04 19:05:06 -07:00
Mike Bostock d85d29e887 Tolerate uninvertible matrices. 2011-11-04 19:03:17 -07:00
Mike Bostock 8d68572f79 Merge branch 'interpolate' of https://github.com/jasondavies/d3 into 2.5.0 2011-11-04 18:08:53 -07:00
Mike Bostock a7ff9fa6e5 Restore d3_interpolateByName for transforms. 2011-11-04 16:46:35 -07:00
Mike Bostock e3f6f33b3d Add d3.transform and d3.interpolateTransform.
This is based on @jasondavies previous work on interpolating 3D matrices,
simplified to only handle 2D transforms, and using SVG to parse transforms.
2011-11-04 16:19:58 -07:00
Mike Bostock ff8225b208 Add state names. 2011-11-04 15:14:06 -07:00
Mike Bostock e78cd68acc Merge branch 'interpolate' of https://github.com/jasondavies/d3 into 2.5.0 2011-11-04 15:13:44 -07:00
Jason Davies 151f0ba076 Slightly shorter regex.
Exactly the same speed in Chrome (probably both are optimised into the
same form): http://jsperf.com/number-matching
2011-11-04 22:12:05 +00:00
Jason Davies e60bc4d525 Fix minor bug in exponent notation interpolation. 2011-11-04 22:01:55 +00:00
Mike Bostock 6fe70a81d4 Remove defunct d3_interpolateByName. 2011-11-04 14:10:01 -07:00
Mike Bostock 306d5047d7 Disable sorting in donut transition example. 2011-11-04 13:48:56 -07:00
Mike Bostock 557abcc7c5 Merge branch 'zoom-extent' of https://github.com/jasondavies/d3 into 2.5.0 2011-11-04 13:41:02 -07:00
Mike Bostock 4cfdc9488f Tiny simplification. 2011-11-04 13:39:06 -07:00
Jason Davies 070b463ac0 Reuse infinite extent. 2011-11-04 20:38:13 +00:00
Jason Davies 92b010fbd1 Fix typo introduced in last commit. 2011-11-04 20:35:09 +00:00
Mike Bostock 1637c4b159 Fix merge bug. 2011-11-04 13:32:14 -07:00
Jason Davies 83f9b82794 Merge remote-tracking branch 'mbostock/zoom' into zoom-extent
Conflicts:
	d3.js
	d3.min.js
	src/behavior/zoom.js
2011-11-04 20:25:45 +00:00
Jason Davies d2c424aa09 A null extent should set extent to infinities. 2011-11-04 20:23:51 +00:00
Jason Davies a5b538b4c6 More meaningful naming. 2011-11-04 20:19:14 +00:00
Mike Bostock 9006592fa3 Merge branch 'zoom-extent' of https://github.com/jasondavies/d3 into zoom 2011-11-04 13:18:19 -07:00
Jason Davies 60e80dc745 Remove unnecessary origin accessor from zoom.
I don't think this is needed any more, as we now clamp the extent in the
behaviour itself.
2011-11-04 20:18:18 +00:00
Jason Davies 14b8d482eb Fix silly bug.
This was due to mishandling infinities in the clamping function, so the
default extent was "backwards".
2011-11-04 20:14:20 +00:00
Mike Bostock 99963f0d18 Merge branch 'zoom-extent' of https://github.com/jasondavies/d3 into zoom 2011-11-04 12:41:42 -07:00
Mike Bostock 4882a6448b Fix range generation for ordinal scales.
Using d3.range with a floating point step is a bit sketchy, because there's a
chance that too many or too few elements could be generated. Instead, we now we
generate an integer range and scale it accordingly.
2011-11-04 12:03:01 -07:00
Mike Bostock 6aad8c7c44 Use a single brush for scatterplot matrix. 2011-11-04 11:28:27 -07:00
Mike Bostock a9043b9650 Merge pull request #363 from jasondavies/extent
Use single loop for d3.extent.
2011-11-03 17:04:02 -07:00