ea 0.6.47 → 0.6.49
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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4735ff087541add85998eedbde491751da68513387014dadccd50c84fa8daaf7
|
|
4
|
+
data.tar.gz: 5e9a3b35f13099b105791506a67b0e7c2854cce7f54d736e82420aa7cd268a57
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7d7331be8f61f4c3b704781ca458f3989e8d57d3547a19df796373744f674fad552e2d191bfc637b7ee1d83faf5eadd3d39f18013dbc08040e0eb27f4cc3cea2
|
|
7
|
+
data.tar.gz: '0688908443b70ea4ebe4582b78657ef9988aeb81c55f6ec23b9e2ee5e74d9f1005075a0e296697f5f3c41e33a5205ba0ed8044dd03e153ae3d6b8bb22a1912db'
|
|
@@ -17,7 +17,7 @@ module Ea
|
|
|
17
17
|
# place (MECE). Element rendering reads these values;
|
|
18
18
|
# coordinate math changes don't ripple into rendering.
|
|
19
19
|
class CompartmentGeometry
|
|
20
|
-
attr_reader :bounds, :size, :header_lines_count,
|
|
20
|
+
attr_reader :bounds, :size, :header_lines_count, :header_ghost,
|
|
21
21
|
:attr_lines_count, :op_lines_count,
|
|
22
22
|
:tagged_values_count,
|
|
23
23
|
:constraints_count,
|
|
@@ -37,7 +37,8 @@ module Ea
|
|
|
37
37
|
header_line_offset: 6,
|
|
38
38
|
divider_offset: 8,
|
|
39
39
|
attr_line_offset: 6,
|
|
40
|
-
attr_first_offset: 7
|
|
40
|
+
attr_first_offset: 7,
|
|
41
|
+
header_ghost: false)
|
|
41
42
|
@bounds = bounds
|
|
42
43
|
@size = size
|
|
43
44
|
@header_lines_count = header_lines_count
|
|
@@ -52,6 +53,7 @@ module Ea
|
|
|
52
53
|
@divider_offset = divider_offset
|
|
53
54
|
@attr_line_offset = attr_line_offset
|
|
54
55
|
@attr_first_offset = attr_first_offset
|
|
56
|
+
@header_ghost = header_ghost
|
|
55
57
|
end
|
|
56
58
|
|
|
57
59
|
def header_first_y
|
|
@@ -68,8 +70,14 @@ module Ea
|
|
|
68
70
|
def divider_y
|
|
69
71
|
return nil if header_lines_count.zero?
|
|
70
72
|
|
|
73
|
+
# The off-canvas parent ghost shifts every following
|
|
74
|
+
# header line +6, and the divider tracks the LAST header
|
|
75
|
+
# baseline + 8 (DD2AC61B: name baseline 85, divider 93).
|
|
76
|
+
ghost_shift = header_ghost ? 6 : 0
|
|
77
|
+
|
|
71
78
|
header_first_y +
|
|
72
79
|
([header_lines_count, 1].max - 1) * (size + (header_line_offset || 6)) +
|
|
80
|
+
ghost_shift +
|
|
73
81
|
(marker_count.to_i * (size + 6)) +
|
|
74
82
|
(divider_offset || 8)
|
|
75
83
|
end
|
|
@@ -104,16 +112,19 @@ module Ea
|
|
|
104
112
|
attr_bottom_y + size + 5
|
|
105
113
|
end
|
|
106
114
|
|
|
115
|
+
# EA's op block: first row 21 below the last attribute row
|
|
116
|
+
# (9pt... 7pt: attr_bottom + 21), uniform 13px pitch across
|
|
117
|
+
# attrs AND ops (6D4C665D: attrs ..520, ops 541..658 step 13).
|
|
107
118
|
def op_first_y
|
|
108
119
|
return nil unless op_lines_count&.positive?
|
|
109
120
|
|
|
110
|
-
|
|
121
|
+
attr_bottom_y + size + 14
|
|
111
122
|
end
|
|
112
123
|
|
|
113
124
|
def op_bottom_y
|
|
114
125
|
return op_divider_y unless op_lines_count&.positive?
|
|
115
126
|
|
|
116
|
-
op_first_y + (op_lines_count - 1) * (size +
|
|
127
|
+
op_first_y + (op_lines_count - 1) * (size + 6)
|
|
117
128
|
end
|
|
118
129
|
|
|
119
130
|
# EA draws a single divider under the header and seats
|
|
@@ -17,7 +17,9 @@ module Ea
|
|
|
17
17
|
CONTENT_X_OFFSET = 20
|
|
18
18
|
|
|
19
19
|
def self.render(operations, bounds:, first_y:, family:, size:)
|
|
20
|
-
|
|
20
|
+
# EA's op rows pitch 13 (size + 6), same as attribute
|
|
21
|
+
# rows (6D4C665D: ops 541..658 step 13).
|
|
22
|
+
line_h = size + 6
|
|
21
23
|
text_blocks = []
|
|
22
24
|
has_receptions = operations.any?(&:is_reception)
|
|
23
25
|
if has_receptions
|
|
@@ -234,6 +234,8 @@ module Ea
|
|
|
234
234
|
constraints_count: 0, marker_count: 0,
|
|
235
235
|
enum_literals_count: 0)
|
|
236
236
|
CompartmentGeometry.new(bounds: bounds, size: size,
|
|
237
|
+
header_ghost: header_lines.any? &&
|
|
238
|
+
header_lines.first.last == :italic,
|
|
237
239
|
header_lines_count: header_lines.size,
|
|
238
240
|
attr_lines_count: attr_lines.size,
|
|
239
241
|
op_lines_count: op_lines.size,
|
data/lib/ea/version.rb
CHANGED