Class: AsciidoctorDiagramLayout::Renderer::HtmlRenderer
- Inherits:
-
Object
- Object
- AsciidoctorDiagramLayout::Renderer::HtmlRenderer
- Defined in:
- lib/asciidoctor_diagram_layout/renderer/html_renderer.rb
Constant Summary collapse
- CELL_BASE =
"display:flex; align-items:center; justify-content:center;" \ " padding:8px; font-weight:bold; font-family:sans-serif;" \ " min-height:60px; box-sizing:border-box; color:#333;"
Instance Method Summary collapse
Instance Method Details
#render(root, options = RenderOptions.new) ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/asciidoctor_diagram_layout/renderer/html_renderer.rb', line 8 def render(root, = RenderOptions.new) sb = +"" height_style = .height ? " min-height:#{.height};" : "" wrapper_style = "display:flex; width:#{.width};#{height_style}" \ " box-sizing:border-box; font-family:sans-serif; overflow:hidden;" sb << "<div style=\"#{wrapper_style}\">\n" render_node(root, sb, 1, ) sb << "</div>\n" sb end |