Skip to content

Commit

Permalink
Remove viewingHint addition to the IIIF Sequence
Browse files Browse the repository at this point in the history
By removing this, UV will not render the "two up" view when an item has
several canvases.
  • Loading branch information
DanOlson committed Oct 24, 2024
1 parent 05c4f84 commit 15c32cd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 19 deletions.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/mdl.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1514,6 +1514,10 @@ a.view-text:hover {
}
}

.thumb.oneCol:focus {
outline: none;
}

.title {
color: white;
}
Expand Down
13 changes: 0 additions & 13 deletions lib/mdl/iiif_manifest_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

###
Expand Down
6 changes: 0 additions & 6 deletions spec/lib/mdl/iiif_manifest_formatter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 15c32cd

Please sign in to comment.