Class: Flms::ImageLayerViewObject
Instance Method Summary
collapse
#initialize, #keyframe_data_hash, link_path_for, #view_partial_name
Instance Method Details
#attributes(scroll_offset = 0) ⇒ Object
15
16
17
18
19
|
# File 'app/view_objects/flms/image_layer_view_object.rb', line 15
def attributes(scroll_offset = 0)
attributes = keyframe_data_hash(scroll_offset)
attributes[:id] = @layer.name
attributes
end
|
#inner_attributes ⇒ Object
8
9
10
11
12
13
|
# File 'app/view_objects/flms/image_layer_view_object.rb', line 8
def inner_attributes
{ style: """
background-image: url(#{src});
background-size: #{@layer.image_display_mode};
""" }
end
|
#src ⇒ Object
4
5
6
|
# File 'app/view_objects/flms/image_layer_view_object.rb', line 4
def src
@layer.image.url
end
|