Skip to content

Commit 3f1d801

Browse files
committed
More TODOs and comments.
1 parent bf88a48 commit 3f1d801

3 files changed

Lines changed: 90 additions & 90 deletions

File tree

d3.js

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6296,7 +6296,7 @@
62966296
})();
62976297
}
62986298
function d3_geo_projectionMutator(projectAt) {
6299-
var project, rotate, rotation, projectRotate, k = 150, x = 480, y = 250, λ = 0, φ = 0, δλ = 0, δφ = 0, δγ = 0, δx = x, δy = y, clip = d3_geo_cut, clipAngle = null;
6299+
var project, rotate, rotation, projectRotate, k = 150, x = 480, y = 250, λ = 0, φ = 0, δλ = 0, δφ = 0, δγ = 0, δx, δy, clip = d3_geo_cut, clipAngle = null;
63006300
function projection(coordinates) {
63016301
coordinates = projectRotate(coordinates[0] * d3_radians, coordinates[1] * d3_radians);
63026302
return [ coordinates[0] * k + δx, δy - coordinates[1] * k ];
@@ -6305,26 +6305,6 @@
63056305
coordinates = projectRotate.invert((coordinates[0] - δx) / k, (δy - coordinates[1]) / k);
63066306
return [ coordinates[0] * d3_degrees, coordinates[1] * d3_degrees ];
63076307
}
6308-
var resample = d3_geo_type({
6309-
Point: function(o) {
6310-
o.coordinates = resamplePoint(o.coordinates);
6311-
},
6312-
MultiPoint: function(o) {
6313-
o.coordinates = o.coordinates.map(resamplePoint);
6314-
},
6315-
LineString: function(o) {
6316-
o.coordinates = resampleLine(o.coordinates);
6317-
},
6318-
MultiLineString: function(o) {
6319-
o.coordinates = o.coordinates.map(resampleLine);
6320-
},
6321-
Polygon: function(o) {
6322-
o.coordinates = resamplePolygon(o.coordinates);
6323-
},
6324-
MultiPolygon: function(o) {
6325-
o.coordinates = o.coordinates.map(resamplePolygon);
6326-
}
6327-
});
63286308
projection.object = function(object) {
63296309
object = clip(rotation(object));
63306310
resample(object);
@@ -6335,16 +6315,6 @@
63356315
clip = _ == null ? (clipAngle = _, d3_geo_cut) : d3_geo_circleClip(clipAngle = +_);
63366316
return projection;
63376317
};
6338-
var rotation = d3_geo_type({
6339-
point: function(coordinates) {
6340-
return rotate(coordinates[0] * d3_radians, coordinates[1] * d3_radians);
6341-
},
6342-
Sphere: d3_identity
6343-
});
6344-
function projectPoint(λ, φ) {
6345-
var point = project(λ, φ);
6346-
return [ point[0] * k + δx, δy - point[1] * k ];
6347-
}
63486318
projection.scale = function(_) {
63496319
if (!arguments.length) return k;
63506320
k = +_;
@@ -6382,6 +6352,36 @@
63826352
return projection;
63836353
}
63846354
var λ00, φ00, λ0, sinφ0, cosφ0, x0, y0, δ2 = .5, maxDepth = 16;
6355+
var resample = d3_geo_type({
6356+
Point: function(o) {
6357+
o.coordinates = resamplePoint(o.coordinates);
6358+
},
6359+
MultiPoint: function(o) {
6360+
o.coordinates = o.coordinates.map(resamplePoint);
6361+
},
6362+
LineString: function(o) {
6363+
o.coordinates = resampleLine(o.coordinates);
6364+
},
6365+
MultiLineString: function(o) {
6366+
o.coordinates = o.coordinates.map(resampleLine);
6367+
},
6368+
Polygon: function(o) {
6369+
o.coordinates = resamplePolygon(o.coordinates);
6370+
},
6371+
MultiPolygon: function(o) {
6372+
o.coordinates = o.coordinates.map(resamplePolygon);
6373+
}
6374+
});
6375+
var rotation = d3_geo_type({
6376+
point: function(coordinates) {
6377+
return rotate(coordinates[0] * d3_radians, coordinates[1] * d3_radians);
6378+
},
6379+
Sphere: d3_identity
6380+
});
6381+
function projectPoint(λ, φ) {
6382+
var point = project(λ, φ);
6383+
return [ point[0] * k + δx, δy - point[1] * k ];
6384+
}
63856385
function resamplePoint(point) {
63866386
return projectPoint(point[0], point[1]);
63876387
}

0 commit comments

Comments
 (0)