Sha256: 970b79d5ef61727f5840066e2806fbac4da30628b42764761cd2218133e4a643

Contents?: true

Size: 704 Bytes

Versions: 1

Compression:

Stored size: 704 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.element_font_color
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
drawio_dsl-0.9.0 lib/drawio_dsl/schema/element.rb