ea 0.6.39 → 0.6.40
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 +4 -4
- data/lib/ea/svg/ea_emitter/label/midpoint_label.rb +13 -0
- data/lib/ea/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 164d7f4eec0c15cd5811283a701759887c6b7431337dd9160506d87c9a9ab673
|
|
4
|
+
data.tar.gz: 603a2def1016cee9b7747c6131d6e815be09c566d8d4325bc0109d71565b9b5f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bcdeea949d117ea448e114300f8f3114d78000fd0212a4e2428e120084957df3bf309fe0bea278303432133c3f91168177b43fab6483088f56df26a7d0cc33f4
|
|
7
|
+
data.tar.gz: 847c43fba07dd14374d031f80731cf10656ebb2e1e63f5674a5c0414dffc1024bba9b7e8026a62f93f17a24921cd7ef5da30b9cb2cec1c598f02b6e76e2321d1
|
|
@@ -33,6 +33,17 @@ module Ea
|
|
|
33
33
|
return nil if content.nil?
|
|
34
34
|
|
|
35
35
|
mx, my = midpoint(points)
|
|
36
|
+
# EA splits a "name: value" label at the colon-space into
|
|
37
|
+
# two lines centered on the same slot (81F92FC7: "new
|
|
38
|
+
# ownership:" / "LA_Right" at y 172/185, both centered on
|
|
39
|
+
# x=480).
|
|
40
|
+
if (idx = content.index(": ")) && content.length > idx + 2
|
|
41
|
+
return [
|
|
42
|
+
render_text(mx, my, content[0..idx]),
|
|
43
|
+
render_text(mx, my + LINE_PITCH, content[(idx + 2)..])
|
|
44
|
+
].join("\n")
|
|
45
|
+
end
|
|
46
|
+
|
|
36
47
|
render_text(mx, my, content)
|
|
37
48
|
end
|
|
38
49
|
|
|
@@ -74,6 +85,8 @@ module Ea
|
|
|
74
85
|
|
|
75
86
|
private
|
|
76
87
|
|
|
88
|
+
LINE_PITCH = 13
|
|
89
|
+
|
|
77
90
|
def midpoint(points)
|
|
78
91
|
mid_idx = points.size / 2
|
|
79
92
|
if points.size.odd?
|
data/lib/ea/version.rb
CHANGED