Skip to content

Commit

Permalink
Merge branch '2.5.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Nov 5, 2011
2 parents 98da365 + 7ae28f1 commit 8cba1d7
Show file tree
Hide file tree
Showing 51 changed files with 2,310 additions and 411 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -1,2 +1,3 @@
_site
node_modules
.DS_Store
6 changes: 5 additions & 1 deletion Makefile
Expand Up @@ -48,6 +48,8 @@ d3.core.js: \
src/core/median.js \
src/core/min.js \
src/core/max.js \
src/core/extent.js \
src/core/random.js \
src/core/number.js \
src/core/sum.js \
src/core/quantile.js \
Expand Down Expand Up @@ -118,6 +120,7 @@ d3.core.js: \
src/core/transition-each.js \
src/core/transition-transition.js \
src/core/timer.js \
src/core/transform.js \
src/core/noop.js

d3.scale.js: \
Expand Down Expand Up @@ -147,7 +150,8 @@ d3.svg.js: \
src/svg/mouse.js \
src/svg/touches.js \
src/svg/symbol.js \
src/svg/axis.js
src/svg/axis.js \
src/svg/brush.js

d3.behavior.js: \
src/behavior/behavior.js \
Expand Down
12 changes: 11 additions & 1 deletion d3.geom.js
Expand Up @@ -268,14 +268,24 @@ function d3_geom_polygonIntersect(c, d, a, b) {
// http://blog.thejit.org/assets/voronoijs/voronoi.js
// See lib/jit/LICENSE for details.

// Notes:
//
// This implementation does not clip the returned polygons, so if you want to
// clip them to a particular shape you will need to do that either in SVG or by
// post-processing with d3.geom.polygon's clip method.
//
// If any vertices are coincident or have NaN positions, the behavior of this
// method is undefined. Most likely invalid polygons will be returned. You
// should filter invalid points, and consolidate coincident points, before
// computing the tessellation.

/**
* @param vertices [[x1, y1], [x2, y2], …]
* @returns polygons [[[x1, y1], [x2, y2], …], …]
*/
d3.geom.voronoi = function(vertices) {
var polygons = vertices.map(function() { return []; });

// Note: we expect the caller to clip the polygons, if needed.
d3_voronoi_tessellate(vertices, function(e) {
var s1,
s2,
Expand Down

0 comments on commit 8cba1d7

Please sign in to comment.