Sha256: 3049e9dcf01757c61d9afacfdddffb3c318a08db7d9f1a32e78ab3979c997d01
Contents?: true
Size: 682 Bytes
Versions: 11
Compression:
Stored size: 682 Bytes
Contents
module Blacklight module OpenseadragonHelper # Somewhat arbitrary number; the only important thing is that # it is bigger than the number of embedded viewers on a page ID_COUNTER_MAX = (2**20) - 1 # Mint a (sufficiently) unique identifier, so we can associate # the expand/collapse control with labels def self.mint_id @id_counter = ((@id_counter || 0) + 1) % ID_COUNTER_MAX # We convert the ID to hex for markup compactness @id_counter.to_s(16) end def osd_container_class 'col-md-6' end # @deprecated def osd_html_id_prefix "osd-#{Blacklight::OpenseadragonHelper.mint_id}".to_param end end end
Version data entries
11 entries across 11 versions & 1 rubygems