Skip to content

Commit

Permalink
Merge pull request #406 from UCLALibrary/keep-info-icon-visible
Browse files Browse the repository at this point in the history
Keep info icon visible in the while changing image size - Update UV config
  • Loading branch information
val99erie authored May 29, 2019
2 parents 050b40a + 6657588 commit 4c3e461
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
4 changes: 4 additions & 0 deletions app/assets/javascripts/uv_width.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
$(document).on('turbolinks:load', function() {
$('#universal-viewer-iframe').width($('.uv-container').width())

$(window).on('resize', function(){
$('#universal-viewer-iframe').width($('.uv-container').width())
})
})
4 changes: 2 additions & 2 deletions app/views/catalog/_uv.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<iframe
class='universal-viewer-iframe'
src=<%= iiif_service.src(request, document) %>
width='640'
height='480'
width='924px'
height='668px'
id='universal-viewer-iframe'
allowfullscreen
frameborder='0'>
Expand Down
8 changes: 4 additions & 4 deletions config/uv/uv.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

}

.uv .mobileFooterPanel .options .btn.fullScreen {
display: inline !important;
}
.moreInfo {
display: inline-block !important;
}

.title > span {
.title > span {
display: none;
}

Expand Down
4 changes: 3 additions & 1 deletion spec/features/view_work_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@
# Don't show download
expect(page).to have_selector('button.download', visible: false)
# Show fullscreen
expect(page).to have_selector('button.fullScreen', visible: true)
# This will only be visible when the screen is desktop size
# Look into setting the chromedriver window size explicilty for this
# expect(page).to have_selector('button.fullScreen', visible: true)
end
end
end

0 comments on commit 4c3e461

Please sign in to comment.