Skip to content

Commit fb7e69f

Browse files
committed
Fix albersUsa, again.
1 parent 3f6fefb commit fb7e69f

6 files changed

Lines changed: 12 additions & 10 deletions

File tree

d3.geo.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,10 @@ d3.geo.albersUsa = function() {
141141
function albersUsa(coordinates) {
142142
var lon = coordinates[0],
143143
lat = coordinates[1];
144-
return (lat < 21
145-
? (lon < -100 ? hawaii : puertoRico)
146-
: (lat > 50 ? alaska : lower48))(coordinates);
144+
return (lat > 50 ? alaska
145+
: lon < -140 ? hawaii
146+
: lat < 21 ? puertoRico
147+
: lower48)(coordinates);
147148
}
148149

149150
albersUsa.scale = function(x) {

d3.geo.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

d3.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(function(){d3 = {version: "2.0.2"}; // semver
1+
(function(){d3 = {version: "2.0.3"}; // semver
22
if (!Date.now) Date.now = function() {
33
return +new Date;
44
};

d3.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/core/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d3 = {version: "2.0.2"}; // semver
1+
d3 = {version: "2.0.3"}; // semver

src/geo/albers.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ d3.geo.albersUsa = function() {
8383
function albersUsa(coordinates) {
8484
var lon = coordinates[0],
8585
lat = coordinates[1];
86-
return (lat < 21
87-
? (lon < -100 ? hawaii : puertoRico)
88-
: (lat > 50 ? alaska : lower48))(coordinates);
86+
return (lat > 50 ? alaska
87+
: lon < -140 ? hawaii
88+
: lat < 21 ? puertoRico
89+
: lower48)(coordinates);
8990
}
9091

9192
albersUsa.scale = function(x) {

0 commit comments

Comments
 (0)