Sha256: 3be90b532c7937a3f45626e1c2b2254fe76ca99566804a8be57d4107eef599e6

Contents?: true

Size: 1 KB

Versions: 3

Compression:

Stored size: 1 KB

Contents

KManager.action :bootstrap do
  action do

    DrawioDsl::Drawio
      .init(k_builder, on_exist: :write, on_action: :execute)
      .diagram(theme: :style_06)
      .page('Style-Plain', margin_left: 0, margin_top: 0) do
        grid_layout(wrap_at: 2, grid_w: 400)

        shape_count = 2
        # for 1 to 20 step 2
        (1..shape_count).step(2).each do |i|
          circle(i, title: i)
          ellipse(i+1, title: i + 1)
        end

        (1..shape_count).step(2).each do |i|
          line(source: i, target: i+1)
        end

        # # label = '<div style="background-color: #B85450; height: 100%; margin: 0; border: 1px solid red;"><p style="padding: 10px; font-size: 12px;color: #ffffff;width: 150px;"><img style="margin-right: 20px" src="https://picsum.photos/40" /> the quick brown fox jumped over the lazy dog</p></div>'
        # label = ''

      end
      .cd(:spec)
      .save('.samples/35-ids-and-arrows.drawio')
      # .cd(:docs)
      # .export_svg('samples/styles-plain', page: 1)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
drawio_dsl-0.8.5 .builders/generators/sample_diagrams/35-ids-and-arrows.rb
drawio_dsl-0.8.4 .builders/generators/sample_diagrams/35-ids-and-arrows.rb
drawio_dsl-0.8.3 .builders/generators/sample_diagrams/35-ids-and-arrows.rb