mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-10 18:25:37 +02:00
Annotation selection
This commit is contained in:
parent
494008eca0
commit
14912b5a03
2 changed files with 14 additions and 7 deletions
|
@ -571,15 +571,23 @@ var TextAnnotation = (function TextAnnotationClosure() {
|
||||||
e.appendChild(document.createElement('br'));
|
e.appendChild(document.createElement('br'));
|
||||||
}
|
}
|
||||||
text.appendChild(e);
|
text.appendChild(e);
|
||||||
image.addEventListener('mouseover', function annotationImageOver() {
|
|
||||||
|
var showAnnotation = function showAnnotation() {
|
||||||
container.style.zIndex += 1;
|
container.style.zIndex += 1;
|
||||||
content.removeAttribute('hidden');
|
content.removeAttribute('hidden');
|
||||||
}, false);
|
};
|
||||||
|
|
||||||
image.addEventListener('mouseout', function annotationImageOut() {
|
var hideAnnotation = function hideAnnotation(e) {
|
||||||
container.style.zIndex -= 1;
|
if (e.toElement || e.relatedTarget) { // No context menu is used
|
||||||
content.setAttribute('hidden', true);
|
container.style.zIndex -= 1;
|
||||||
}, false);
|
content.setAttribute('hidden', true);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
content.addEventListener('mouseover', showAnnotation, false);
|
||||||
|
content.addEventListener('mouseout', hideAnnotation, false);
|
||||||
|
image.addEventListener('mouseover', showAnnotation, false);
|
||||||
|
image.addEventListener('mouseout', hideAnnotation, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
content.appendChild(title);
|
content.appendChild(title);
|
||||||
|
|
|
@ -1259,7 +1259,6 @@ canvas {
|
||||||
}
|
}
|
||||||
|
|
||||||
.annotText > img:hover {
|
.annotText > img:hover {
|
||||||
cursor: pointer;
|
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue