ea 0.6.48 → 0.6.50
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/element/compartment_geometry.rb +13 -2
- data/lib/ea/svg/ea_emitter/element/header_line_provider/parent_ghost.rb +1 -1
- data/lib/ea/svg/ea_emitter/element/header_renderer.rb +9 -4
- data/lib/ea/svg/ea_emitter/elements.rb +4 -0
- data/lib/ea/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b916fbabbb74feb86f428a75fc8619acad646f676767544c1128e0ba635d3f52
|
|
4
|
+
data.tar.gz: dc470c0abf5864ccf0fa0c5d42d76a429b2491c30df15e6c19ff1231416b88f7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 49e1694bc33b133631b8baae3abe2cc0e0b154b06dbc1dc39b1ad6801b781939a80ab17edb63eb07bb58726aeff81d6210e3ae9198172cee2e68943cb7ae9de6
|
|
7
|
+
data.tar.gz: fc902135136a3103cc8456651d56c2945320f208aebfc8fd72be47c20bc389f9206f0704e559e7c824b2a1818dd238e5ab02c4559f48992e2047babd7d572ea1
|
|
@@ -17,7 +17,8 @@ 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
|
+
:header_ghost_tight,
|
|
21
22
|
:attr_lines_count, :op_lines_count,
|
|
22
23
|
:tagged_values_count,
|
|
23
24
|
:constraints_count,
|
|
@@ -37,7 +38,9 @@ module Ea
|
|
|
37
38
|
header_line_offset: 6,
|
|
38
39
|
divider_offset: 8,
|
|
39
40
|
attr_line_offset: 6,
|
|
40
|
-
attr_first_offset: 7
|
|
41
|
+
attr_first_offset: 7,
|
|
42
|
+
header_ghost: false,
|
|
43
|
+
header_ghost_tight: false)
|
|
41
44
|
@bounds = bounds
|
|
42
45
|
@size = size
|
|
43
46
|
@header_lines_count = header_lines_count
|
|
@@ -52,6 +55,8 @@ module Ea
|
|
|
52
55
|
@divider_offset = divider_offset
|
|
53
56
|
@attr_line_offset = attr_line_offset
|
|
54
57
|
@attr_first_offset = attr_first_offset
|
|
58
|
+
@header_ghost = header_ghost
|
|
59
|
+
@header_ghost_tight = header_ghost_tight
|
|
55
60
|
end
|
|
56
61
|
|
|
57
62
|
def header_first_y
|
|
@@ -68,8 +73,14 @@ module Ea
|
|
|
68
73
|
def divider_y
|
|
69
74
|
return nil if header_lines_count.zero?
|
|
70
75
|
|
|
76
|
+
# The off-canvas parent ghost shifts every following
|
|
77
|
+
# header line +3, and the divider tracks the LAST header
|
|
78
|
+
# baseline + 8 (936AA434: ghost 100, stereo 116 = +16).
|
|
79
|
+
ghost_shift = header_ghost ? (header_ghost_tight ? 3 : 6) : 0
|
|
80
|
+
|
|
71
81
|
header_first_y +
|
|
72
82
|
([header_lines_count, 1].max - 1) * (size + (header_line_offset || 6)) +
|
|
83
|
+
ghost_shift +
|
|
73
84
|
(marker_count.to_i * (size + 6)) +
|
|
74
85
|
(divider_offset || 8)
|
|
75
86
|
end
|
|
@@ -23,11 +23,16 @@ module Ea
|
|
|
23
23
|
else weight_normal
|
|
24
24
|
end
|
|
25
25
|
font_style = (style == :italic || style == :bold_italic) ? "italic" : "normal"
|
|
26
|
-
# EA spaces the line AFTER a right-aligned ghost
|
|
27
|
-
# wider
|
|
28
|
-
#
|
|
26
|
+
# EA spaces the line AFTER a right-aligned ghost 3px
|
|
27
|
+
# wider than the pitch. Interfaces use a tighter +3
|
|
28
|
+
# (936AA434/Surface: ghost 100, «interface» 116).
|
|
29
|
+
ghost_shift = case lines.first.last
|
|
30
|
+
when :italic then 6
|
|
31
|
+
when :italic_tight then 3
|
|
32
|
+
else 0
|
|
33
|
+
end
|
|
29
34
|
y = first_y + (idx * line_h) +
|
|
30
|
-
(idx >= 1 &&
|
|
35
|
+
(idx >= 1 && ghost_shift.positive? ? ghost_shift : 0)
|
|
31
36
|
x = if style == :italic
|
|
32
37
|
# EA right-aligns the off-canvas parent ghost at
|
|
33
38
|
# the box's right edge by its integer textLength.
|
|
@@ -234,6 +234,10 @@ 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
|
+
%i[italic italic_tight].include?(header_lines.first.last),
|
|
239
|
+
header_ghost_tight: header_lines.any? &&
|
|
240
|
+
header_lines.first.last == :italic_tight,
|
|
237
241
|
header_lines_count: header_lines.size,
|
|
238
242
|
attr_lines_count: attr_lines.size,
|
|
239
243
|
op_lines_count: op_lines.size,
|
data/lib/ea/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ea
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.50
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|