Class: Ea::Model::DiagramConnector
- Defined in:
- lib/ea/model/diagram_connector.rb
Overview
A connector drawn on a diagram between two DiagramElements. References the underlying Relationship (by id) and the source and target DiagramElements (by id). Carries ordered waypoints for routing plus the EA EDGE codes (1=top, 2=right, 3=bottom, 4=left, 5..8=diagonal variants) which tell the renderer where to anchor the line on each end.
Constant Summary collapse
- IMPLICIT_TYPES =
EA encodes package nesting and other implicit relationships as connector rows in t_diagramlinks. These are typically not rendered as paths in the SVG output — the containment is implied by visual position. However, when a connector has the
treestyle attribute (e.g. "V" for vertical tree routing), EA renders it as a real visible connector with a "+" marker at the contained end. %w[Nesting].freeze
Instance Method Summary collapse
-
#renderable? ⇒ Boolean
True when this connector should appear in SVG output.
Instance Method Details
#renderable? ⇒ Boolean
True when this connector should appear in SVG output. False
when hidden via the Hidden flag. Implicit-type connectors
(e.g. Nesting) are filtered out UNLESS they carry a tree
style attribute marking them as visible (basic.qea's
"Package Contents" diagram has visible nesting; simple.qea's
"Package Contents" diagram has invisible implicit nesting).
74 75 76 77 78 79 |
# File 'lib/ea/model/diagram_connector.rb', line 74 def renderable? return false if hidden return true unless IMPLICIT_TYPES.include?(connector_type.to_s) (style || {}).key?(:tree) || (style || {}).key?("tree") end |