ea 0.6.13 → 0.6.15
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/sources/qea/diagram_builder.rb +36 -21
- data/lib/ea/svg/ea_emitter/label/end_label.rb +8 -7
- 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: d69a2edfc36e402cd81b0eda6c4eb5c43cb0fda3ad8c46fcc2e4e5d1de63d8ec
|
|
4
|
+
data.tar.gz: d5bfb484b0d84399bfe8e54fd874374a7200dbb3e667dc47f0330f5f65a6531f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ba29936fcceaa22430339e69dd4db37a47fd39b7c6c474484740fb8d218014a1c0a4bfa84fc6ab09fd90adf4402e65cf51fbf96cd3e63cc8e116c45065ba4a07
|
|
7
|
+
data.tar.gz: 947511083114075e9ad373e11f20c1c4dcea02cd9f5b35da4719243430a2228322da6922bb6b95903fd63a30cc6568ac12d6d5b353a02e633b567cbbc674eaa5
|
|
@@ -377,9 +377,31 @@ module Ea
|
|
|
377
377
|
element_edge_point(target_placement, :target, edge_out)
|
|
378
378
|
|
|
379
379
|
intermediate = intermediate_waypoints(link_row)
|
|
380
|
-
if
|
|
381
|
-
|
|
382
|
-
|
|
380
|
+
if edge_out == 2 && source_port && target_port &&
|
|
381
|
+
!valid_tree_path?(intermediate, source_placement)
|
|
382
|
+
# EA recomputes tree routes at DRAW TIME from current
|
|
383
|
+
# element positions when the stored Path no longer lands
|
|
384
|
+
# on the source's facing edge (hand-verified: SY 8542's
|
|
385
|
+
# stale Path vs EA-drawn route; CityObjectGroup's current
|
|
386
|
+
# Path renders byte-exact and is kept). Computed route:
|
|
387
|
+
# source port -> corner at (target dock x, source exit
|
|
388
|
+
# y) -> target port.
|
|
389
|
+
points = [[source_point[0], source_point[1]],
|
|
390
|
+
[target_point[0], source_point[1]],
|
|
391
|
+
[target_point[0], target_point[1]]]
|
|
392
|
+
elsif edge_out == 2 && intermediate.size == 1
|
|
393
|
+
# Current tree Path (bend on the source's facing edge):
|
|
394
|
+
# EA's draw-time route shape — source right edge at the
|
|
395
|
+
# bend's y, corner at the bend, target facing edge at the
|
|
396
|
+
# bend's x (byte-exact on CityObjectGroup).
|
|
397
|
+
src = bounds_from_rect(source_placement)
|
|
398
|
+
tgt = bounds_from_rect(target_placement)
|
|
399
|
+
bend = intermediate.first
|
|
400
|
+
going_up = tgt.y + tgt.height <= src.y
|
|
401
|
+
target_y = going_up ? tgt.y + tgt.height : tgt.y
|
|
402
|
+
points = [[src.x + src.width, bend[1]],
|
|
403
|
+
[bend[0], bend[1]],
|
|
404
|
+
[bend[0], target_y]]
|
|
383
405
|
elsif intermediate.any?
|
|
384
406
|
points = [source_point, *intermediate, target_point]
|
|
385
407
|
elsif source_port || target_port
|
|
@@ -395,24 +417,17 @@ module Ea
|
|
|
395
417
|
end
|
|
396
418
|
end
|
|
397
419
|
|
|
398
|
-
#
|
|
399
|
-
#
|
|
400
|
-
#
|
|
401
|
-
#
|
|
402
|
-
#
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
src = bounds_from_rect(source_placement)
|
|
410
|
-
tgt = bounds_from_rect(target_placement)
|
|
411
|
-
bend_x = bend[0]
|
|
412
|
-
source_point = [src.x + src.width, bend[1]]
|
|
413
|
-
going_up = tgt.y + tgt.height <= src.y
|
|
414
|
-
target_y = going_up ? tgt.y + tgt.height : tgt.y
|
|
415
|
-
[source_point, [bend_x, bend[1]], [bend_x, target_y]]
|
|
420
|
+
# A tree Path is current when its bend height still falls
|
|
421
|
+
# within the source element's y-range (the exit height EA
|
|
422
|
+
# records); a bend outside the element is stale and EA
|
|
423
|
+
# re-derives the route at draw time. The bend's x may sit
|
|
424
|
+
# arbitrarily far right (trunk position).
|
|
425
|
+
def valid_tree_path?(intermediate, source_placement)
|
|
426
|
+
return false if intermediate.empty?
|
|
427
|
+
|
|
428
|
+
bend = intermediate.first
|
|
429
|
+
b = bounds_from_rect(source_placement)
|
|
430
|
+
bend[1].between?(b.y - 5, b.y + b.height + 5)
|
|
416
431
|
end
|
|
417
432
|
|
|
418
433
|
# Absolute connection point EA docks the connector's visible
|
|
@@ -69,11 +69,12 @@ module Ea
|
|
|
69
69
|
|
|
70
70
|
private
|
|
71
71
|
|
|
72
|
-
# EA's tree-route label clusters (verified against
|
|
73
|
-
# EA-published reference
|
|
74
|
-
# the exit point (role +3/-23,
|
|
75
|
-
#
|
|
76
|
-
# the role
|
|
72
|
+
# EA's tree-route label clusters (hand-verified against the
|
|
73
|
+
# EA-published reference, SY 8542 with canvas=(0,0)):
|
|
74
|
+
# source-end pairs stack at the exit point (role +3/-23,
|
|
75
|
+
# mult +3/0); target-end pairs sit just above the dock
|
|
76
|
+
# astride the trunk — role right edge at trunk+7, mult
|
|
77
|
+
# starting at trunk+8, both at dock_y - 8.
|
|
77
78
|
def zero_offset?(text_box, mult_box)
|
|
78
79
|
[text_box, mult_box].compact.all? do |b|
|
|
79
80
|
b["ox"].to_i.zero? && b["oy"].to_i.zero?
|
|
@@ -88,8 +89,8 @@ module Ea
|
|
|
88
89
|
width = Ea::Fonts::Metrics.text_length(
|
|
89
90
|
role.to_s, font_size, family: font_family
|
|
90
91
|
) || role.to_s.length * 6
|
|
91
|
-
[[anchor[0] +
|
|
92
|
-
[anchor[0] + 8,
|
|
92
|
+
[[anchor[0] + 7 - width, anchor[1] - 8],
|
|
93
|
+
[anchor[0] + 8, anchor[1] - 8]]
|
|
93
94
|
end
|
|
94
95
|
end
|
|
95
96
|
|
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.15
|
|
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-
|
|
11
|
+
date: 2026-10-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|