Module: Pageflow::LinkmapPage::AreasHelper
- Includes:
- BackgroundImageHelper, RevisionFileHelper
- Defined in:
- app/helpers/pageflow/linkmap_page/areas_helper.rb
Defined Under Namespace
Classes: Link
Instance Method Summary collapse
- #linkmap_area(entry, attributes, index, background_type = nil, &block) ⇒ Object
- #linkmap_area_background_image_div(prefix, attributes, configuration, color_map_file) ⇒ Object
- #linkmap_areas_div(entry, configuration) ⇒ Object
- #linkmap_content_and_background_css_classes(configuration) ⇒ Object
Instance Method Details
#linkmap_area(entry, attributes, index, background_type = nil, &block) ⇒ Object
55 56 57 |
# File 'app/helpers/pageflow/linkmap_page/areas_helper.rb', line 55 def linkmap_area(entry, attributes, index, background_type = nil, &block) Link.new(self, entry, attributes.symbolize_keys, index, background_type).render(&block) end |
#linkmap_area_background_image_div(prefix, attributes, configuration, color_map_file) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'app/helpers/pageflow/linkmap_page/areas_helper.rb', line 37 def linkmap_area_background_image_div(prefix, attributes, configuration, color_map_file) color_map_component_id = attributes['color_map_component_id'] || attributes['mask_perma_id'] if color_map_file && color_map_component_id.present? && color_map_component_id.split(':').first.to_i == color_map_file.perma_id background_image_div(configuration, "linkmap_masked_#{prefix}_image", class: "#{prefix}_image", file_type: 'pageflow_linkmap_page_masked_image_files', style_group: color_map_component_id.split(':').last) else background_image_div(configuration, "#{prefix}_image", class: "#{prefix}_image", style_group: :panorama) end end |
#linkmap_areas_div(entry, configuration) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'app/helpers/pageflow/linkmap_page/areas_helper.rb', line 18 def linkmap_areas_div(entry, configuration) color_map_file = find_file_in_entry(ColorMapFile, configuration['linkmap_color_map_file_id']) masked_hover_image_file = find_file_in_entry(MaskedImageFile, configuration['linkmap_masked_hover_image_id']) masked_visited_image_file = find_file_in_entry(MaskedImageFile, configuration['linkmap_masked_visited_image_id']) render('pageflow/linkmap_page/areas/div', entry: entry, configuration: configuration, color_map_file: color_map_file, masked_hover_image_file: masked_hover_image_file, masked_visited_image_file: masked_visited_image_file, data_attributes: { color_map_file_id: configuration['color_map_file_id'] }) end |
#linkmap_content_and_background_css_classes(configuration) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'app/helpers/pageflow/linkmap_page/areas_helper.rb', line 7 def linkmap_content_and_background_css_classes(configuration) = configuration['mobile_panorama_navigation'] == 'pan_zoom' && configuration['hide_linkmap_overlay_boxes'] [ 'content_and_background linkmap_page unplayed', ? 'hide_overlay_boxes' : nil ].compact.join(' ') end |