Module: Ea::Svg::EaEmitter::Compartment::TaggedValues
- Defined in:
- lib/ea/svg/ea_emitter/compartment/tagged_values.rb
Overview
Tagged value compartment. Skipped when no tagged values or when geometry cannot fit them.
Constant Summary collapse
- DEFAULT_TEXT_COLOR =
"#000000"
Class Method Summary collapse
Class Method Details
.render(context) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/ea/svg/ea_emitter/compartment/tagged_values.rb', line 14 def render(context) return nil unless context.tagged_values.any? return nil unless context.geometry.tagged_value_first_y Element::TaggedValueRenderer.render( context.tagged_values, bounds: context.bounds, first_y: context.geometry.tagged_value_first_y, family: context.family, size: context.size, fill: DEFAULT_TEXT_COLOR ) end |