From 15c32cdda86a19eca2e70e1792a924caec2f3f92 Mon Sep 17 00:00:00 2001 From: Dan Olson Date: Wed, 23 Oct 2024 20:51:41 -0400 Subject: [PATCH] Remove viewingHint addition to the IIIF Sequence By removing this, UV will not render the "two up" view when an item has several canvases. --- app/assets/stylesheets/mdl.scss | 4 ++++ lib/mdl/iiif_manifest_formatter.rb | 13 ------------- spec/lib/mdl/iiif_manifest_formatter_spec.rb | 6 ------ 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/app/assets/stylesheets/mdl.scss b/app/assets/stylesheets/mdl.scss index 016b2ece..b99cd202 100644 --- a/app/assets/stylesheets/mdl.scss +++ b/app/assets/stylesheets/mdl.scss @@ -1514,6 +1514,10 @@ a.view-text:hover { } } + .thumb.oneCol:focus { + outline: none; + } + .title { color: white; } diff --git a/lib/mdl/iiif_manifest_formatter.rb b/lib/mdl/iiif_manifest_formatter.rb index 1db94ced..05b24907 100644 --- a/lib/mdl/iiif_manifest_formatter.rb +++ b/lib/mdl/iiif_manifest_formatter.rb @@ -33,22 +33,9 @@ def format(doc, retries = 3) } apply_page_level_metadata(doc, parsed_response) - format_sequence(parsed_response) JSON.generate(parsed_response) end - def format_sequence(manifest) - sequence = Array(manifest['sequences'])[0] - canvases = Array(sequence['canvases']) - if sequence && canvases.size > 2 - ### - # With this, UV will support "two-up" (side-by-side) pages - # in the viewer. Only makes sense visually if there are - # at least three canvases (pages). - manifest['sequences'][0]['viewingHint'] = 'paged' - end - end - private ### diff --git a/spec/lib/mdl/iiif_manifest_formatter_spec.rb b/spec/lib/mdl/iiif_manifest_formatter_spec.rb index 13d0a106..2f8fdf92 100644 --- a/spec/lib/mdl/iiif_manifest_formatter_spec.rb +++ b/spec/lib/mdl/iiif_manifest_formatter_spec.rb @@ -49,12 +49,6 @@ module MDL } JSON end - - it 'applies a viewingHint of "paged" to the sequence' do - result = described_class.format(doc) - parsed_result = JSON.parse(result) - expect(parsed_result['sequences'][0]['viewingHint']).to eq('paged') - end end context 'with a multi-page document' do