topojson-rails 0.0.21 → 0.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  module Topojson
2
2
  module Rails
3
- VERSION = "0.0.21"
3
+ VERSION = "0.0.32"
4
4
  end
5
5
  end
@@ -119,7 +119,8 @@ topojson = (function() {
119
119
  }
120
120
 
121
121
  function geometry(o) {
122
- if (o.type in geometryType) {
122
+ if (o.type === "GeometryCollection") o.geometries.forEach(geometry);
123
+ else if (o.type in geometryType) {
123
124
  geom = o;
124
125
  geometryType[o.type](o.arcs);
125
126
  }
@@ -132,9 +133,7 @@ topojson = (function() {
132
133
  MultiPolygon: function(arcs) { arcs.forEach(polygon); }
133
134
  };
134
135
 
135
- o.type === "GeometryCollection"
136
- ? o.geometries.forEach(geometry)
137
- : geometry(o);
136
+ geometry(o);
138
137
 
139
138
  geomsByArc.forEach(arguments.length < 3
140
139
  ? function(geoms, i) { arcs.push([i]); }
@@ -240,7 +239,8 @@ topojson = (function() {
240
239
  }
241
240
 
242
241
  function geometry(o, i) {
243
- if (o.type in geometryType) geometryType[o.type](o.arcs, i);
242
+ if (o.type === "GeometryCollection") o.geometries.forEach(function(o) { geometry(o, i); });
243
+ else if (o.type in geometryType) geometryType[o.type](o.arcs, i);
244
244
  }
245
245
 
246
246
  var geometryType = {
@@ -255,7 +255,7 @@ topojson = (function() {
255
255
  }
256
256
 
257
257
  return {
258
- version: "0.0.21",
258
+ version: "0.0.32",
259
259
  mesh: mesh,
260
260
  object: object,
261
261
  neighbors: neighbors
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: topojson-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.32
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-26 00:00:00.000000000 Z
12
+ date: 2013-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties