Merge pull request #7971 from davehouse/remove_viewer_page_div_id
remove viewer page div id
This commit is contained in:
commit
2170eda9df
@ -112,7 +112,6 @@ var PDFPageView = (function PDFPageViewClosure() {
|
|||||||
this.annotationLayer = null;
|
this.annotationLayer = null;
|
||||||
|
|
||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
div.id = 'pageContainer' + this.id;
|
|
||||||
div.className = 'page';
|
div.className = 'page';
|
||||||
div.style.width = Math.floor(this.viewport.width) + 'px';
|
div.style.width = Math.floor(this.viewport.width) + 'px';
|
||||||
div.style.height = Math.floor(this.viewport.height) + 'px';
|
div.style.height = Math.floor(this.viewport.height) + 'px';
|
||||||
|
@ -124,8 +124,8 @@ var PDFThumbnailView = (function PDFThumbnailViewClosure() {
|
|||||||
this.anchor = anchor;
|
this.anchor = anchor;
|
||||||
|
|
||||||
var div = document.createElement('div');
|
var div = document.createElement('div');
|
||||||
div.id = 'thumbnailContainer' + id;
|
|
||||||
div.className = 'thumbnail';
|
div.className = 'thumbnail';
|
||||||
|
div.setAttribute('data-page-number', this.id);
|
||||||
this.div = div;
|
this.div = div;
|
||||||
|
|
||||||
if (id === 1) {
|
if (id === 1) {
|
||||||
|
@ -87,7 +87,8 @@ var PDFThumbnailViewer = (function PDFThumbnailViewerClosure() {
|
|||||||
if (selected) {
|
if (selected) {
|
||||||
selected.classList.remove('selected');
|
selected.classList.remove('selected');
|
||||||
}
|
}
|
||||||
var thumbnail = document.getElementById('thumbnailContainer' + page);
|
var thumbnail = document.querySelector(
|
||||||
|
'div.thumbnail[data-page-number="' + page + '"]');
|
||||||
if (thumbnail) {
|
if (thumbnail) {
|
||||||
thumbnail.classList.add('selected');
|
thumbnail.classList.add('selected');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user