Remove unused annotation highlight div
This is now done using CSS. For annotation-heavy documents this change makes the DOM much lighter.
This commit is contained in:
parent
6e994b15e2
commit
c67ad28673
@ -18,7 +18,6 @@
|
|||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var HIGHLIGHT_OFFSET = 4; // px
|
|
||||||
var ANNOT_MIN_SIZE = 10; // px
|
var ANNOT_MIN_SIZE = 10; // px
|
||||||
|
|
||||||
var AnnotationUtils = (function AnnotationUtilsClosure() {
|
var AnnotationUtils = (function AnnotationUtilsClosure() {
|
||||||
@ -66,16 +65,6 @@ var AnnotationUtils = (function AnnotationUtilsClosure() {
|
|||||||
}
|
}
|
||||||
cstyle.width = width + 'px';
|
cstyle.width = width + 'px';
|
||||||
cstyle.height = height + 'px';
|
cstyle.height = height + 'px';
|
||||||
|
|
||||||
var highlight = document.createElement('div');
|
|
||||||
highlight.className = 'annotationHighlight';
|
|
||||||
highlight.style.left = highlight.style.top = -HIGHLIGHT_OFFSET + 'px';
|
|
||||||
highlight.style.right = highlight.style.bottom = -HIGHLIGHT_OFFSET + 'px';
|
|
||||||
highlight.setAttribute('hidden', true);
|
|
||||||
|
|
||||||
item.highlightElement = highlight;
|
|
||||||
container.appendChild(item.highlightElement);
|
|
||||||
|
|
||||||
return container;
|
return container;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,11 +72,6 @@
|
|||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pdfViewer .page .annotationHighlight {
|
|
||||||
position: absolute;
|
|
||||||
border: 2px #FFFF99 solid;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pdfViewer .page .annotText > img {
|
.pdfViewer .page .annotText > img {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
Loading…
Reference in New Issue
Block a user