Class: Ea::Svg::EaEmitter::Marker::ArrowPath
- Defined in:
- lib/ea/svg/ea_emitter/marker/arrow_path.rb
Overview
Navigability arrow at the target end of an association.
Rendered as a <path> (not polygon) sharing style with the
connector line. When both ends are navigable
(bidirectional association), EA renders a separate arrow at
each end.
Class Method Summary collapse
- .handles?(effective_type) ⇒ Boolean
- .specs_for(connector, source, target, before_target, after_source, relationship: nil) ⇒ Object
Methods inherited from Kind
Class Method Details
.handles?(effective_type) ⇒ Boolean
13 14 15 |
# File 'lib/ea/svg/ea_emitter/marker/arrow_path.rb', line 13 def self.handles?(effective_type) effective_type == "Association" end |
.specs_for(connector, source, target, before_target, after_source, relationship: nil) ⇒ Object
17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ea/svg/ea_emitter/marker/arrow_path.rb', line 17 def self.specs_for(connector, source, target, before_target, after_source, relationship: nil) return bidirectional_specs(source, target, before_target, after_source) if bidirectional?(connector) whole_end_at_source = whole_end_at_source?(connector) anchor = whole_end_at_source ? target : source base = whole_end_at_source ? before_target : after_source [Registry::Spec.new(shape: :arrow, anchor: anchor, base: base)] end |