ea 0.6.85 → 0.6.86
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/end_label.rb +15 -5
- 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: d265f1502ae56f1c39b2a03af8a59b7fa5d4f295782ce7c8f08e71be3a5c73fa
|
|
4
|
+
data.tar.gz: 38328cfd1956e44fd6b1ad2343117d4e4db50f46e60f4ee1af829e922184ebb3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2dd0cce5f97bc753203bffc6a56fb71ee97c34608c6d8294cb3f33ad9dc571e5287ee60054facaa9924fd44d33ef36d92f7e5c895b5aeaab0649befb1923f48d
|
|
7
|
+
data.tar.gz: 3aae3266a3a835ca4eded0fcfdfca0eded377204cd54c1c55a8034abec707e6701671155d98c4782b6ca253ebc811f706d09a6afa0097184c6eedeaf81fe095a
|
|
@@ -68,10 +68,14 @@ module Ea
|
|
|
68
68
|
# dominant with a +3 minority).
|
|
69
69
|
mult_pos = [anchor[0] + 12, anchor[1] + 15]
|
|
70
70
|
end
|
|
71
|
-
|
|
71
|
+
# The end's stored stereotype renders verbatim («Type» on
|
|
72
|
+
# 066E0FD1, «Property» on the Property ends); no line when
|
|
73
|
+
# the end has none.
|
|
74
|
+
stereo = connector_source_dest_stereotype(connector, end_kind)
|
|
75
|
+
stereo = stereo.nil? || stereo.empty? ? nil : "«#{stereo}»"
|
|
72
76
|
|
|
73
77
|
build_texts(role:, mult:, standalone:,
|
|
74
|
-
text_pos:, mult_pos:,
|
|
78
|
+
text_pos:, mult_pos:, stereo:)
|
|
75
79
|
end
|
|
76
80
|
|
|
77
81
|
private
|
|
@@ -106,12 +110,12 @@ module Ea
|
|
|
106
110
|
end
|
|
107
111
|
|
|
108
112
|
def build_texts(role:, mult:, standalone:, text_pos:, mult_pos:,
|
|
109
|
-
|
|
113
|
+
stereo:)
|
|
110
114
|
if role && !role.empty? && text_pos
|
|
111
115
|
x, y = text_pos
|
|
112
116
|
texts = [text_at(x, y, role)]
|
|
113
|
-
if
|
|
114
|
-
texts << text_at(x, y + property_y_offset,
|
|
117
|
+
if stereo
|
|
118
|
+
texts << text_at(x, y + property_y_offset, stereo)
|
|
115
119
|
end
|
|
116
120
|
if mult && !mult.empty? && mult_pos
|
|
117
121
|
texts << text_at(*mult_pos, mult)
|
|
@@ -133,6 +137,12 @@ module Ea
|
|
|
133
137
|
# profile diagrams mark ends explicitly.
|
|
134
138
|
PROPERTY_KEYWORD = "property"
|
|
135
139
|
|
|
140
|
+
def connector_source_dest_stereotype(connector, end_kind)
|
|
141
|
+
stereo = end_kind == :source ? connector.source_stereotype :
|
|
142
|
+
connector.target_stereotype
|
|
143
|
+
stereo.to_s.strip
|
|
144
|
+
end
|
|
145
|
+
|
|
136
146
|
def property_label?(connector, end_kind)
|
|
137
147
|
stereo = end_kind == :source ? connector.source_stereotype : connector.target_stereotype
|
|
138
148
|
stereo.to_s.downcase == PROPERTY_KEYWORD
|
data/lib/ea/version.rb
CHANGED