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

23 Коммитов

Автор SHA1 Сообщение Дата
Mike Bostock f76f564451 Fix #993; d3.geom.hull is now ccw. 2013-04-30 15:30:56 -07:00
Jason Davies bcf70c96c9 Add test for quadtree with no bounds. 2013-03-22 00:01:16 +00:00
Jason Davies 34059e22c4 Minor code style fixes. 2013-03-21 22:01:51 +00:00
Jason Davies fd40dc2774 Refactor d3.geom.hull. 2013-03-19 17:19:21 +00:00
Jason Davies 15ec3e8d90 Optimise voronoi for default accessors. 2013-03-19 16:13:11 +00:00
Jason Davies 112ec6fac8 d3.geom.voronoi: always assign input data. 2013-03-19 16:02:09 +00:00
Jason Davies 7643e22714 d3.geom.voronoi: return the configured size. 2013-03-19 15:11:03 +00:00
Jason Davies 7c7366155f Refactor d3.geom.quadtree.
See #1145.
2013-03-19 11:35:51 +00:00
Jason Davies 788f8cd958 Refactor d3.geom.voronoi.
See #1145.
2013-03-19 11:35:49 +00:00
Mike Bostock 0d7c6c55e7 Use _ to disambiguate local vs. global d3. 2013-03-14 15:14:12 -07:00
Mike Bostock 68be0ac8c8 Rename assert and XMLHttpRequest. 2013-03-14 13:00:04 -07:00
Mike Bostock 1ff5f504a9 Refactor geom tests for minimal loading. 2013-03-14 09:43:53 -07:00
Mike Bostock 608902c907 Checkpoint test refactoring. 2013-03-13 23:21:23 -07:00
Mike Bostock a3bb93a749 Fix vows clobbering our custom asserts. 2013-03-05 09:01:18 -08:00
Jason Davies 86e159872f s/º/°/g 2012-12-08 14:48:54 +00:00
Jason Davies 915f044b8f Fix loss of significance for d3.geom.polygon.area. 2012-12-06 10:40:06 +00:00
Mike Bostock 92ae464cc9 Fix another Voronoi bug with N=2. 2012-10-26 17:29:00 -07:00
Mike Bostock d9a1281e08 Fix #438 - degenerate voronoi polygons. 2012-10-06 16:40:37 -07:00
Mike Bostock a77079280a Add tests for d3.geom.quadtree.
Also remove backwards-compatibility for [x, y] input.
2012-10-06 13:19:05 -07:00
Mike Bostock 3081dd45ef Consolidate everything into d3.v2.js.
Rather than producing separate files for each module, the default build now
produces a single file. This should encourage better page-load performance as
the files were relatively small. Also, it's easier to deal with only one file
rather than many, especially if you're not quite sure what the dependencies are.
You may still create minimized builds, if you don't want every feature.

This commit also demotes the chart components to the examples directory, rather
than keeping them as part of the core library. As always, D3 is not a charting
library, and these were ever only intended to serve as examples.
2012-02-18 14:04:01 -08:00
Mike Bostock 85ad3c16b0 Fix polygon.centroid for open polygons.
The implementation assumed closed polygons, but it should work on either. This
is a partial fix for #443.
2012-01-29 14:29:14 -08:00
Jason Davies f9148ed4f4 Rearrange polygon tests.
This arranges them first by the type of polygon we're testing, then the
operations.  I've added tests for clockwise polygons too, for good
measure.
2011-10-08 18:19:01 +01:00
Jason Davies 3740741441 Add tests for d3.geom.polygon and fix centroid bug.
d3.geom.polygon(…).area() assumes screen pixel coordinates with (0, 0)
at the top left, and y increasing going downwards.  This results in a
positive area for counterclockwise coordinates.  Howver, the default
centroid calculation was assuming "usual" Cartesian coordinates with y
increasing going upwards, hence the centroid coordinates were
incorrectly multiplied by -1.

This fix won't affect d3.geo.path(…).centroid() as it passes a constant
to d3.geom.centroid.
2011-10-08 18:01:53 +01:00