ea 0.6.41 → 0.6.42
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 +11 -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: ce2116bd834c1bad4cb1c4cb3fca104bc80fd8971ee6793c0d64cab509cfc77e
|
|
4
|
+
data.tar.gz: b79a9f5c8c351977dc1959762e3e61305c852e439180410d06b55637a03b1618
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3b0f583529750ae25b27b62df895494f6a889ff26b07a499e8c157994b641157b73151b8c3262b9c83c74e317afcde5eb27fdc00af2e66e52574964708d11a81
|
|
7
|
+
data.tar.gz: 4e95b7f695382cd536309f53e4360de715a119eaabedbc943fda9ba9433b24e691093cda231f66f0dde8a30046ea73b0718f759afa0113ac6d7150261d57137d
|
|
@@ -60,6 +60,13 @@ module Ea
|
|
|
60
60
|
if tree && zero_offset?(text_box, mult_box)
|
|
61
61
|
text_pos, mult_pos = tree_positions(end_kind, anchor, role,
|
|
62
62
|
text_pos, mult_pos)
|
|
63
|
+
elsif mult_box && stored_offsets_zero?(mult_box)
|
|
64
|
+
# A stored mult box with OX=0:OY=0 means "EA default":
|
|
65
|
+
# the multiplicity sits 15px BELOW the endpoint anchor,
|
|
66
|
+
# regardless of line direction (87-sample corpus fit:
|
|
67
|
+
# dy = +15 constant; the dx residual follows the
|
|
68
|
+
# dock-slot family).
|
|
69
|
+
mult_pos = [anchor[0], anchor[1] + 15]
|
|
63
70
|
end
|
|
64
71
|
show_property = property_label?(connector, end_kind)
|
|
65
72
|
|
|
@@ -75,6 +82,10 @@ module Ea
|
|
|
75
82
|
# mult +3/0); target-end pairs sit just above the dock
|
|
76
83
|
# astride the trunk — role right edge at trunk+7, mult
|
|
77
84
|
# starting at trunk+8, both at dock_y - 8.
|
|
85
|
+
def stored_offsets_zero?(box)
|
|
86
|
+
box["ox"].to_i.zero? && box["oy"].to_i.zero?
|
|
87
|
+
end
|
|
88
|
+
|
|
78
89
|
def zero_offset?(text_box, mult_box)
|
|
79
90
|
[text_box, mult_box].compact.all? do |b|
|
|
80
91
|
b["ox"].to_i.zero? && b["oy"].to_i.zero?
|
data/lib/ea/version.rb
CHANGED