Class: Ea::Svg::EaEmitter::Marker::PackageImport

Inherits:
Kind
  • Object
show all
Defined in:
lib/ea/svg/ea_emitter/marker/package_import.rb

Overview

PackageImport marker for «import» connectors between packages. EA draws a closed trapezoid silhouette at the source end (the importing package) and an open V-arrow at the target end (the imported package) — but ONLY when the connector's geometry string carries explicit SX/SY offset fields. Auto-routed connectors (no SX/SY) render as a plain solid line with no package_anchor marker.

Verified against both QEAs (output by the same EA run):

- basic.qea Package Imports: SX=0;SY=0 present → marker
- plateau Urban Planning ADE2: SX/SY absent → no marker

Class Method Summary collapse

Methods inherited from Kind

whole_end_at_source?

Class Method Details

.handles?(effective_type) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/ea/svg/ea_emitter/marker/package_import.rb', line 19

def self.handles?(effective_type)
  effective_type == "Package"
end

.specs_for(connector, source, target, before_target, after_source, relationship: nil) ⇒ Object



23
24
25
26
27
28
29
30
31
32
# File 'lib/ea/svg/ea_emitter/marker/package_import.rb', line 23

def self.specs_for(connector, source, target, before_target, after_source, relationship: nil)
  return [] unless connector.has_geometry_offsets

  [
    Registry::Spec.new(shape: :package_anchor,
                       anchor: source, base: after_source),
    Registry::Spec.new(shape: :arrow, anchor: target,
                       base: before_target)
  ]
end