ea 0.6.52 → 0.6.54
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: 4b54f39e2dcdb482e55baad21977878ea11d4325ce84130b5a1be52d94461199
|
|
4
|
+
data.tar.gz: e06fe1f966c7b82cd9a4ee5e0cef8482f5bb83050a74354d10e674b80e6b1317
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a8c21021bb901b607f7e823bcd5caef4e10343177db98983f450a517c71d3ec929566c9ddc93dde15985bcc2fee88ffe469c164687589325d085bea94abf200d
|
|
7
|
+
data.tar.gz: 538ea960c3033cb4b16fdedccdcc9a27be793e1d6615ad836cd340aec103bca7c86937720e74d925a1f06653939015a8a303ada6a7056a0e7209308fde308fb1
|
|
@@ -111,26 +111,27 @@ module Ea
|
|
|
111
111
|
value.nil? || value.to_s.empty? ? nil : value
|
|
112
112
|
end
|
|
113
113
|
|
|
114
|
-
# EA stores the element font size in tenths of a point
|
|
115
|
-
#
|
|
116
|
-
#
|
|
117
|
-
#
|
|
118
|
-
#
|
|
119
|
-
#
|
|
120
|
-
#
|
|
121
|
-
#
|
|
122
|
-
#
|
|
123
|
-
|
|
114
|
+
# EA stores the element font size in tenths of a point and
|
|
115
|
+
# renders it through GDI's double rounding: pixel height =
|
|
116
|
+
# floor(tenths * 96 / 720), then point size =
|
|
117
|
+
# floor(pixels * 72 / 96). 70 -> 9px -> 6pt (F3660305 Text),
|
|
118
|
+
# 80 -> 10px -> 7pt, 90 -> 12px -> 9pt (4EBDE645's PI_*
|
|
119
|
+
# classes), 100 -> 13px -> 9pt (0D31AED1's all-100 elements
|
|
120
|
+
# publish 321 texts at 9pt), 120 -> 16px -> 12pt
|
|
121
|
+
# (412BC89E's Boundary title), 140 -> 18px -> 13pt.
|
|
122
|
+
# fontsz=0 ("use default", written back by the font dialog)
|
|
123
|
+
# renders at the 7pt theme size.
|
|
124
|
+
USE_DEFAULT_FONTSZ = [0].freeze
|
|
125
|
+
GDI_DPI = 96
|
|
124
126
|
|
|
125
127
|
def font_size_from(style_hash)
|
|
126
128
|
raw = style_hash[:fontsz]
|
|
127
129
|
return nil if raw.nil? || raw.to_s.empty?
|
|
128
130
|
|
|
129
|
-
return nil if raw.to_i.zero?
|
|
130
|
-
|
|
131
131
|
return nil if USE_DEFAULT_FONTSZ.include?(raw.to_i)
|
|
132
132
|
|
|
133
|
-
(raw.to_f /
|
|
133
|
+
pixels = (raw.to_f * GDI_DPI / 720).floor
|
|
134
|
+
(pixels * 72.0 / GDI_DPI).floor
|
|
134
135
|
end
|
|
135
136
|
|
|
136
137
|
def build_connectors(diagram_row)
|
|
@@ -33,6 +33,7 @@ module Ea
|
|
|
33
33
|
multiplicity_upper_raw: raw_upper(row),
|
|
34
34
|
multiplicity_upper: parse_upper(row),
|
|
35
35
|
default_value: row.default,
|
|
36
|
+
is_derived: boolean(row.derived),
|
|
36
37
|
is_ordered: boolean(row.isordered),
|
|
37
38
|
is_unique: !boolean(row.allowduplicates),
|
|
38
39
|
visibility: visibility_from_scope(row.scope),
|
|
@@ -64,6 +64,10 @@ module Ea
|
|
|
64
64
|
def namespaced_name
|
|
65
65
|
prefix = inherited_namespace_prefix
|
|
66
66
|
base = property.name.to_s
|
|
67
|
+
# EA flags derived attributes with a '/' on the NAME (the
|
|
68
|
+
# visibility slot still shows '+'): 096AF2FD/GM_GriddedSurface
|
|
69
|
+
# renders "+ /columns: Integer" / "+ /rows: Integer".
|
|
70
|
+
base = "/#{base}" if property.is_derived
|
|
67
71
|
prefix && !prefix.empty? ? "#{prefix}::#{base}" : base
|
|
68
72
|
end
|
|
69
73
|
|
|
@@ -129,8 +129,11 @@ module Ea
|
|
|
129
129
|
foreign_package_name: foreign_package_name_for(classifier),
|
|
130
130
|
suppress_stereotypes: suppress_stereotypes?) : []
|
|
131
131
|
is_classifier = classifier.is_a?(Ea::Model::Classifier)
|
|
132
|
+
# Interfaces DO render attribute compartments when they own
|
|
133
|
+
# attribute rows (936AA434/Surface lists its nine 19107
|
|
134
|
+
# attributes); the earlier corpus evidence for
|
|
135
|
+
# header-only interfaces was zero-attribute leaf types.
|
|
132
136
|
attr_lines = if is_classifier && show_attributes? &&
|
|
133
|
-
!classifier.is_a?(Ea::Model::Interface) &&
|
|
134
137
|
attributes_visible?(element)
|
|
135
138
|
Element::AttributeRenderer.lines_for(
|
|
136
139
|
classifier, lookup: attribute_lookup,
|
data/lib/ea/version.rb
CHANGED