Skip to content

Commit

Permalink
minor interface enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
dealfonso committed Apr 7, 2022
1 parent 4b89dbd commit aa8ee23
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
<a href="#" onclick='pdfViewer.setZoom(4); return false;'>400%</a>
</div>
</div>
<button onclick="hideselected();"><i class="material-icons-outlined">block</i></button>
<button id="hideselected" onclick="hideselected();"><i class="material-icons-outlined">block</i></button>
<div class="divider"></div>
<label class="button" for="opendoc"><i class="material-icons-outlined">file_open</i></label>
<input id="opendoc" type="file" accept="application/pdf">
Expand Down Expand Up @@ -243,7 +243,12 @@

pdfThumbnails.setActivePage = function(pageno) {
this.$container.find('.pdfpage').removeClass('selected');

let $npage = this.$container.find('.pdfpage[data-page="' + pageno + '"]').addClass('selected');
$('#hideselected').removeClass('pushed');
if ($npage.hasClass('hidden'))
$('#hideselected').addClass('pushed');

if (!this.isPageVisible(pageno)) {
this.scrollToPage(pageno);
}
Expand Down

0 comments on commit aa8ee23

Please sign in to comment.