Class: Archimate::Svg::Entity::Node
- Inherits:
-
BaseEntity
- Object
- BaseEntity
- Archimate::Svg::Entity::Node
- Defined in:
- lib/archimate/svg/entity/node.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from BaseEntity
#background_class, #badge, #badge_bounds, #bounds_offset, #child, #entity, #text_bounds
Instance Method Summary collapse
- #entity_shape(xml, bounds) ⇒ Object
-
#initialize(child, bounds_offset) ⇒ Node
constructor
A new instance of Node.
Methods included from NodeShape
Methods included from Rect
Methods inherited from BaseEntity
#entity_badge, #entity_label, #group_attrs, #optional_link, #shape_style, #text_lines, #text_style, #to_svg
Constructor Details
#initialize(child, bounds_offset) ⇒ Node
Returns a new instance of Node.
11 12 13 |
# File 'lib/archimate/svg/entity/node.rb', line 11 def initialize(child, bounds_offset) super end |
Instance Method Details
#entity_shape(xml, bounds) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/archimate/svg/entity/node.rb', line 15 def entity_shape(xml, bounds) case child.child_type when "1" @badge_bounds = DataModel::Bounds.new( x: bounds.right - 25, y: bounds.top + 5, width: 20, height: 20 ) @badge = "#archimate-node-badge" rect_path(xml, bounds) else node_path(xml, bounds) end end |