astromapper 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/astromapper/svg.rb +4 -4
- data/lib/astromapper/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77f2484e0499ad8e34daa87a443cfc8040c6fde3
|
4
|
+
data.tar.gz: a71aabeaa776a7ae3c5d001a43dade72ec542f44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4faba1554cfb505e4803538d85707c470c654e2817f4574367564bd70ec87150a50a790a08fb2bcc9f4159151d0bf238687dcbd3b4f2a3cb72b8c81b2bba9089
|
7
|
+
data.tar.gz: ed4a0e2f19d65f1692663e60d790c3a94709460ca91aa5a1e42169a70b347901ef422f61ec66195f50b0c147373477c47c24d643c6e2b1b020f85bcef9d6434b
|
data/lib/astromapper/svg.rb
CHANGED
@@ -74,7 +74,7 @@ module Astromapper
|
|
74
74
|
font-size: 14px;
|
75
75
|
fill: #222;
|
76
76
|
}
|
77
|
-
g.
|
77
|
+
g.volumes text {
|
78
78
|
fill: #DDD;
|
79
79
|
}
|
80
80
|
polyline {
|
@@ -218,15 +218,15 @@ module Astromapper
|
|
218
218
|
return output
|
219
219
|
end
|
220
220
|
def volumes
|
221
|
-
output = ''
|
221
|
+
output = "<g class='volumes'>"
|
222
222
|
(@rows+2).times do |r|
|
223
223
|
(@columns+1).times do |c|
|
224
224
|
x = @side + ((c-1) * @side * 1.5)
|
225
225
|
y = (c % 2 == 1) ? (r-1) * @side * @factor + (0.2 * @side) : (r-1) * @side * @factor + @hex[:side_h]+ (0.2 * @side)
|
226
|
-
output += "<text
|
226
|
+
output += "<text x='#{x.tweak}' y='#{y.tweak}'>%02d%02d</text>\n" % [c,r]
|
227
227
|
end
|
228
228
|
end
|
229
|
-
output
|
229
|
+
output += "</g>"
|
230
230
|
end
|
231
231
|
def polygon(x, y, sx, sy, sides=4)
|
232
232
|
polygon = star_coords(sx, sy, sides).map { |c| "#{x + c[0]},#{y.tweak+c[1]}" }
|
data/lib/astromapper/version.rb
CHANGED