Sha256: 97339d2aebd9a298900367b78d5bbdce342370b258d421387274b89ab08f899f

Contents?: true

Size: 438 Bytes

Versions: 2

Compression:

Stored size: 438 Bytes

Contents

module Flms
  class ImageLayerViewObject < Flms::LayerViewObject

    def src
      @layer.image.url
    end

    def inner_attributes
      { style: """
          background-image: url(#{src});
          background-size: #{@layer.image_display_mode};
        """ }
    end

    def attributes(scroll_offset = 0)
      attributes = keyframe_data_hash(scroll_offset)
      attributes[:id] = @layer.name
      attributes
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
flms-0.9.0 app/view_objects/flms/image_layer_view_object.rb
flms-0.1.0 app/view_objects/flms/image_layer_view_object.rb