Class: Geoblacklight::ItemMapViewerComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Geoblacklight::ItemMapViewerComponent
- Defined in:
- app/components/geoblacklight/item_map_viewer_component.rb
Instance Method Summary collapse
-
#display_tag ⇒ Object
If the conditions for this being IIIF content are met, dislay the IIIF viewer If it is oembed content, display the oembed viewer Otherwise display the base viewer which will take into account if it is open layers or generic content.
-
#initialize(document:) ⇒ ItemMapViewerComponent
constructor
A new instance of ItemMapViewerComponent.
- #render? ⇒ Boolean
Constructor Details
#initialize(document:) ⇒ ItemMapViewerComponent
Returns a new instance of ItemMapViewerComponent.
5 6 7 8 |
# File 'app/components/geoblacklight/item_map_viewer_component.rb', line 5 def initialize(document:) super @document = document end |
Instance Method Details
#display_tag ⇒ Object
If the conditions for this being IIIF content are met, dislay the IIIF viewer If it is oembed content, display the oembed viewer Otherwise display the base viewer which will take into account if it is open layers or generic content.
14 15 16 17 18 19 |
# File 'app/components/geoblacklight/item_map_viewer_component.rb', line 14 def display_tag return iiif_tag if iiif? return if base_tag end |
#render? ⇒ Boolean
21 22 23 |
# File 'app/components/geoblacklight/item_map_viewer_component.rb', line 21 def render? @document end |