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

1065 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock e2b112bc81 Add tests for attrTween and styleTween. 2011-08-21 17:16:57 -07:00
Mike Bostock 51c7e58fdb Add test for transition.remove.
Also fix a bug where it would be possible for an earlier to transition to become
the lock owner. We now guarantee that the lock owner can only increase while
transitions are scheduled on an element.
2011-08-21 15:54:17 -07:00
Mike Bostock 8cc290a00a Add test for transition.call. 2011-08-21 15:21:57 -07:00
Mike Bostock aeae92ca5c Add test for transition.text. 2011-08-21 15:19:09 -07:00
Mike Bostock 5764e49992 Add tests for transition delay and duration. 2011-08-21 15:01:31 -07:00
Mike Bostock af418fb5a4 Better tests for transitions.
This caught a couple bugs in the previous commit. First, I wasn't sending the
correct index (i) to the "end" event listeners, because it was being masked by
a local variable. Second, the transition lock was being incorrectly deleted when
a transition is inherited on the same node and there is zero delay and
d3.timer.flush is called. There was potentially a related bug where the active
field was not being cleared on the transition lock. Yay tests!
2011-08-20 23:50:34 -07:00
Mike Bostock 4b25f0a62b Simplify map implementation. 2011-08-20 17:04:50 -07:00
Mike Bostock 3b04b4f5ee Oops, didn't mean to comment this out.
(Still passes though!)
2011-08-20 17:04:04 -07:00
Mike Bostock 18b9e11414 Prototype injection!
This changes the core implementation of selections and transitions to use
prototype injection rather than direct extension. This offers better performance
by eliminating per-instance overhead from closures and assignment. On browsers
that don't support prototype injection, we fall back to direct extension.

This commit isn't just about performance, though; the code ends up being a lot
cleaner and more separable if we force methods to rely solely on `this`, rather
than capturing surrounding variables with closures.

Most importantly, transitions are now "transparent", like selections. Rather
than opaque objects, transitions are now arrays of nodes, similar to selections.
The nodes are wrapped in an object that stores the delay and duration, which
means you can now inspect the computed delay and duration. (This was the
original motivation for this commit, and will allow chart components to be
call'd on transitions as well as selections.)

Transitions now support the `each` operator with one argument, which has the
same behavior as on selections. The `each` operator now passes a third argument
containing the group index (`j`). Transitions now also support a `tween`
operator, which is a generic mechanism for doing things during a transition; use
this in place of a "tick" event.

This commit also fixes a few bugs. The enter selection now supports the empty
operator; we can add other operators in the future more easily, if we so choose.
Transition's attr operator now supports namespaced attributes. Selection's
property operator no longer parses property namespaces.
2011-08-20 16:27:25 -07:00
Jason Davies debf96c742 Add missing semicolon. 2011-08-20 14:38:46 +01:00
Mike Bostock 0548319663 Add support for axis updates.
But, we don't yet support transitions and proper data joins.
2011-08-19 15:22:46 -07:00
Mike Bostock 83278300fd Allow tickSize to be negative. 2011-08-19 14:45:56 -07:00
Mike Bostock 7184c57fbb Expose tickSize and tickPadding properties. 2011-08-19 14:44:23 -07:00
Mike Bostock 4eedce984c Checkpoint axis component.
This is the simplest possible implementation. It does not yet support updating
an existing display, specifying different scales for different instances,
overriding ticks, overriding tick format, transitions, etc. etc.
2011-08-19 14:26:39 -07:00
Mike Bostock 34202d4f44 Add example data. 2011-08-19 14:02:47 -07:00
Mike Bostock f55d002f03 Merge branch 'enter-update' into axis 2011-08-19 13:57:06 -07:00
Mike Bostock 434b9eedb9 Merge branch 'master' into scale-clone 2011-08-19 13:56:02 -07:00
Mike Bostock 83f4914831 Merge branch 'master' into enter-update 2011-08-19 13:55:43 -07:00
Mike Bostock 402c2e4922 Merge branch 'release' 2011-08-19 11:02:39 -07:00
Mike Bostock 3c0f29943c Add test for tree layout.
For now, test the bug we just fixed.
2011-08-19 11:01:12 -07:00
Mike Bostock 43aeb6018d Merge branch 'tree-empty-children' into release 2011-08-19 10:57:46 -07:00
Mike Bostock 34d5d276ae Whitespace. 2011-08-19 10:56:37 -07:00
Mike Bostock 2acaf4efbc Merge branch 'force' of https://github.com/jasondavies/d3 into release 2011-08-19 10:55:48 -07:00
Mike Bostock bb289bbdf3 Fix for empty children with tree layout. 2011-08-19 10:10:29 -07:00
Jason Davies 2440287d45 Don't trigger mousemove on mouseup in force layout.
Avoids a spurious layout restart if the mouse hasn't moved.

Fixes #207.
2011-08-19 11:13:22 +01:00
Mike Bostock d2b152ce7f Fix a bug in ordinal.copy. More tests. 2011-08-18 14:59:55 -07:00
Mike Bostock c513f515c6 Merge branch 'master' into scale-clone 2011-08-18 12:44:31 -07:00
Mike Bostock 377e9e6065 Add marker example. 2011-08-18 10:14:34 -07:00
Mike Bostock 82385841fc Replace submodule with package.json.
This is better, because now we can enumerate all of our dependencies without
embedding them as submodules. After pulling, run `npm install`.
2011-08-18 10:10:16 -07:00
Mike Bostock b7fb05ab0f Merge branch 'test' 2011-08-17 16:24:19 -07:00
Mike Bostock 00d8bf71a3 Rename lib/uglifyjs to lib/uglify-js. 2011-08-17 16:23:11 -07:00
Mike Bostock 7c2062f289 Fix a crash when rounding very small numbers. 2011-08-17 16:13:50 -07:00
Mike Bostock f12352c6f4 Add test for svg.area.radial.
Also, better formatting for failure message in assert.pathEqual.
2011-08-17 16:07:28 -07:00
Mike Bostock ff083fd068 Better tests for svg.area and svg.line.radial. 2011-08-17 14:58:49 -07:00
Mike Bostock b5a857fda9 Add test for svg.line.radial. 2011-08-17 14:24:54 -07:00
Mike Bostock 8f78f5ec39 Better tests for svg.line. 2011-08-17 14:09:34 -07:00
Mike Bostock 559394bdb9 Better tests for svg.arc.
This also fixes a bug when start and end angle are inverted.
2011-08-17 13:27:55 -07:00
Mike Bostock 97db7800ea Replace lib/uglifyjs with a submodule.
This brings along a newer version of UglifyJS that fixes some bugs, too.
2011-08-17 13:13:37 -07:00
Mike Bostock 72c9cd4dde Add test for categorical scales. 2011-08-16 23:11:52 -07:00
Mike Bostock f23cb315de Add test for scale.quantize. 2011-08-16 22:51:32 -07:00
Mike Bostock 3db7fd1b65 Add test for csv.format. 2011-08-16 22:39:02 -07:00
Mike Bostock aa6401693d Add test for csv. 2011-08-16 22:30:46 -07:00
Mike Bostock 746ec74663 Add tests for xhr and friends. 2011-08-16 22:28:15 -07:00
Mike Bostock 40b98c4d7b Add test for timer.
Also fix a minor bug where we might miss the delay the first callback by an
extra frame, and allow d3.timer to be called with an optional delay.
2011-08-16 21:21:16 -07:00
Mike Bostock ae4306eaa6 Merge branch 'test' 2011-08-16 12:31:00 -07:00
Mike Bostock e3886060b9 Add test for ease. 2011-08-16 12:26:47 -07:00
Mike Bostock 7d018fbc41 Add test for dispatch. 2011-08-16 11:32:32 -07:00
Mike Bostock eccef138e6 Add test for range.
Also, fix a bug where step could be specified as undefined or null, rather than
checking the arity of the arguments.
2011-08-16 11:16:53 -07:00
Mike Bostock 22732f5da8 Add test for quantile. 2011-08-16 10:59:34 -07:00
Mike Bostock ffb445bb1b Add test for requote.
And, fix a bug where pipes were not escaped.
2011-08-16 10:51:55 -07:00