Sha256: 147e57400a2c419cfb194c13dafdc9328adc14ed5f0b83ec5eb754b3a58904a6

Contents?: true

Size: 1.25 KB

Versions: 2

Compression:

Stored size: 1.25 KB

Contents

require 'glimmer/opal/property_owner'

module Glimmer
  module Opal
    class LayoutDataProxy
      include PropertyOwner
      attr_reader :parent, 
                  :args, 
                  :horizontal_alignment, 
                  :vertical_alignment, 
                  :grab_excess_horizontal_space,
                  :grab_excess_vertical_space,
                  :height_hint
    
      def initialize(parent, args)
        @parent = parent
        @args = args
        reapply
      end

      def height_hint=(height_hint)
        @height_hint = height_hint
        reapply
      end

      def horizontal_alignment=(horizontal_alignment)
        @horizontal_alignment = horizontal_alignment
        reapply
      end
      
      def vertical_alignment=(vertical_alignment)
        @vertical_alignment = vertical_alignment
        reapply
      end
      
      def grab_excess_horizontal_space=(grab_excess_horizontal_space)
        @grab_excess_horizontal_space = grab_excess_horizontal_space
        reapply
      end

      def grab_excess_vertical_space=(grab_excess_vertical_space)
        @grab_excess_vertical_space = grab_excess_vertical_space
        reapply
      end

      def reapply
#         @parent.css = <<~CSS
#         CSS
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
glimmer-dsl-opal-0.0.9 lib/glimmer/opal/layout_data_proxy.rb
glimmer-dsl-opal-0.0.8 lib/glimmer/opal/layout_data_proxy.rb