d3js-plugins-rails 0.0.10 → 0.0.11

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5b27a8748ecdd4f4863e1f690f65212053a140f
4
- data.tar.gz: 580983bf036cb143c8767d7bb9f392b5e0476051
3
+ metadata.gz: 29eafd250d86f8c65274bd6a5a3fc3a205ad45b2
4
+ data.tar.gz: 2285bb3876a4807b312451b716eeb99a5d74f865
5
5
  SHA512:
6
- metadata.gz: c1a9faf55471c1540c591df6bc27765010b4ea7de1994e6016bc0d3f38aea044ab60d6f41ccb0dd08ad7e318b9a9a983b8bedc2e1954546bf3c220047a139638
7
- data.tar.gz: fb8a3eb9bc2a80784d43cdb33f24c0442010ba453b0d0049379a5b50c9c490b3d87acae5b70732efc65da7de3a9ec7aa3f540c9d371583729d1b89965451131b
6
+ metadata.gz: e3a4021ade9b5685e88ab213bea930421855cf339e6db64900230254c21667a41d2740d95a7ec9e845483f474d8a49e922731735b3e4dd2c0f48da5ab38b7c03
7
+ data.tar.gz: 2b6aeebb5e66e1b017fbff208ce1e87b9144d0f9288bc740f1dfef5dc48b2f1bfd995067bdf7af22caed82b27f8dc9c4386a0452c9aa67f1b76821621eb7de49
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,8 +1,8 @@
1
1
  module D3js
2
2
  module Plugins
3
3
  module Rails
4
- VERSION = "0.0.10"
5
- D3_PLUGINS_VERSION = "'43754618a6e1ddc944b90047520091331511968b'"
4
+ VERSION = "0.0.11"
5
+ D3_PLUGINS_VERSION = "37cf8158cd66f6aa6aba8a8739ae44ed391ca9f8"
6
6
  end
7
7
  end
8
8
  end
@@ -26,7 +26,9 @@
26
26
  coordinates: subdivideFaces(~~n).map(function(face) {
27
27
  face = face.map(project);
28
28
  face.push(face[0]);
29
- return [face];
29
+ face = [face];
30
+ if (d3.geo.area({type: "Polygon", coordinates: face}) > Math.PI) face[0].reverse();
31
+ return face;
30
32
  })
31
33
  };
32
34
  },
@@ -29,6 +29,8 @@ d3.hexbin = function() {
29
29
  var id = pi + "-" + pj, bin = binsById[id];
30
30
  if (bin) bin.push(point); else {
31
31
  bin = binsById[id] = [point];
32
+ bin.i = pi;
33
+ bin.j = pj;
32
34
  bin.x = (pi + (pj & 1 ? 1 / 2 : 0)) * dx;
33
35
  bin.y = pj * dy;
34
36
  }
@@ -68,9 +70,12 @@ d3.hexbin = function() {
68
70
 
69
71
  hexbin.centers = function() {
70
72
  var centers = [];
71
- for (var y = 0, odd = false; y < height + r; y += dy, odd = !odd) {
72
- for (var x = odd ? dx / 2 : 0; x < width; x += dx) {
73
- centers.push([x, y]);
73
+ for (var y = 0, odd = false, j = 0; y < height + r; y += dy, odd = !odd, ++j) {
74
+ for (var x = odd ? dx / 2 : 0, i = 0; x < width + dx / 2; x += dx, ++i) {
75
+ var center = [x, y];
76
+ center.i = i;
77
+ center.j = j;
78
+ centers.push(center);
74
79
  }
75
80
  }
76
81
  return centers;
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: d3js-plugins-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vlad Gorodetsky
@@ -29,26 +29,26 @@ cert_chain:
29
29
  JCf887eMZl/8mEIeCLb+gH5sh5yJJpti2HTLnR4Q1QKWR/0T9tASoQPF3kL62n9+
30
30
  m1B90+fEzJsBDQIAsnLPqxjivWbIIfZ7GeGZyA==
31
31
  -----END CERTIFICATE-----
32
- date: 2013-08-29 00:00:00.000000000 Z
32
+ date: 2013-12-17 00:00:00.000000000 Z
33
33
  dependencies:
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: railties
36
36
  requirement: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.0'
41
- - - <
41
+ - - "<"
42
42
  - !ruby/object:Gem::Version
43
43
  version: '5.0'
44
44
  type: :runtime
45
45
  prerelease: false
46
46
  version_requirements: !ruby/object:Gem::Requirement
47
47
  requirements:
48
- - - '>='
48
+ - - ">="
49
49
  - !ruby/object:Gem::Version
50
50
  version: '3.0'
51
- - - <
51
+ - - "<"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '5.0'
54
54
  description: Shared plugins for d3js library.
@@ -58,7 +58,7 @@ executables: []
58
58
  extensions: []
59
59
  extra_rdoc_files: []
60
60
  files:
61
- - .gitignore
61
+ - ".gitignore"
62
62
  - Gemfile
63
63
  - LICENSE
64
64
  - README.md
@@ -128,17 +128,17 @@ require_paths:
128
128
  - lib
129
129
  required_ruby_version: !ruby/object:Gem::Requirement
130
130
  requirements:
131
- - - '>='
131
+ - - ">="
132
132
  - !ruby/object:Gem::Version
133
133
  version: '0'
134
134
  required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  requirements: []
140
140
  rubyforge_project:
141
- rubygems_version: 2.0.3
141
+ rubygems_version: 2.1.11
142
142
  signing_key:
143
143
  specification_version: 4
144
144
  summary: Gemified d3js-plugins asset for Rails
metadata.gz.sig CHANGED
@@ -1 +1 @@
1
- p� l��:M-�����΍#
1
+ ��8<4���cL���(=ZTz��ԯ8����K�;�Y�z� HȤ7w�h���V��5YkJj�^��&���J��w���z� $ ��C���gi��t�˥z�#�ZyW����'hu�b/��E��4_���m'�zu��5�uN��&�l(~��sZ����6RPr���@,"v����"� �p(�j��sF�����-�����#�I&��Zv��[y��iT2�Ջ���\�T$�9D`�x��k�����F