File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11d3 . geo . centroid = function ( object ) {
22 d3_geo_centroidDimension = d3_geo_centroidW = d3_geo_centroidX = d3_geo_centroidY = d3_geo_centroidZ = 0 ;
33 d3 . geo . stream ( object , d3_geo_centroid ) ;
4- // TODO mixed geometries
54 var m ;
65 if ( d3_geo_centroidW &&
76 Math . abs ( m = Math . sqrt ( d3_geo_centroidX * d3_geo_centroidX + d3_geo_centroidY * d3_geo_centroidY + d3_geo_centroidZ * d3_geo_centroidZ ) ) > ε ) {
Original file line number Diff line number Diff line change 11// TODO Unify this code with d3.geom.polygon centroid?
22// TODO Enforce positive area for exterior, negative area for interior?
3- // TODO ignore lower dimensions.
43
54var d3_geo_pathCentroid = {
65 point : d3_geo_pathCentroidPoint ,
Original file line number Diff line number Diff line change 1- // TODO fallback for projections that don't implement stream? (or fix albersUsa?)
1+ // TODO fallback for projections that don't implement stream?
22// TODO cache pathBuffer / pathContext across invocations?
33// TODO better encapsulation for d3_geo_pathArea; move to area.js
44// TODO better encapsulation for d3_geo_pathCentroid; move to centroid.js
You can’t perform that action at this time.
0 commit comments