Skip to content

Commit

Permalink
Fix global n in topojson.merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Jan 16, 2016
1 parent b6ef5e4 commit 3ed6ee9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bower.json
@@ -1,6 +1,6 @@
{
"name": "topojson",
"version": "1.6.19",
"version": "1.6.20",
"main": "topojson.js",
"scripts": [
"topojson.js"
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "topojson",
"version": "1.6.19",
"version": "1.6.20",
"description": "An extension to GeoJSON that encodes topology.",
"keywords": [
"geojson",
Expand Down
8 changes: 4 additions & 4 deletions topojson.js
@@ -1,6 +1,6 @@
!function() {
var topojson = {
version: "1.6.19",
version: "1.6.20",
mesh: function(topology) { return object(topology, meshArcs.apply(this, arguments)); },
meshArcs: meshArcs,
merge: function(topology) { return object(topology, mergeArcs.apply(this, arguments)); },
Expand Down Expand Up @@ -180,7 +180,7 @@
return {
type: "MultiPolygon",
arcs: components.map(function(polygons) {
var arcs = [];
var arcs = [], n;

// Extract the exterior (unique) arcs.
polygons.forEach(function(polygon) {
Expand Down Expand Up @@ -414,7 +414,7 @@
}

return topology;
};
}

function cartesianRingArea(ring) {
var i = -1,
Expand All @@ -429,7 +429,7 @@
area += a[0] * b[1] - a[1] * b[0];
}

return area * .5;
return area / 2;
}

function cartesianTriangleArea(triangle) {
Expand Down

0 comments on commit 3ed6ee9

Please sign in to comment.