Sha256: dc13b032133adbfdb886c208d4489fc53db67d6710b11cc0196cc3079e51e713

Contents?: true

Size: 696 Bytes

Versions: 4

Compression:

Stored size: 696 Bytes

Contents

# frozen_string_literal: true

module DrawioDsl
  module Schema
    # Elements represents some kind of shape such as a Square, Circle, Callout, Actor, etc.
    class Element < Shape
      class << self
        def configure_as(key)
          configure_shape(key, :element)
        end
      end

      def apply_defaults(args)
        super(args)

        @fill_color       = args[:fill_color]       || theme_palette.fill_color
        @stroke_color     = args[:stroke_color]     || theme_palette.stroke_color
        @gradient         = args[:gradient]         || theme_palette.gradient
        @font_color       = args[:font_color]       || theme_palette.font_color
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
drawio_dsl-0.11.1 lib/drawio_dsl/schema/element.rb
drawio_dsl-0.11.0 lib/drawio_dsl/schema/element.rb
drawio_dsl-0.10.1 lib/drawio_dsl/schema/element.rb
drawio_dsl-0.10.0 lib/drawio_dsl/schema/element.rb