Merge pull request #3431 from timvandermeij/annotation-selection

Annotation selection
This commit is contained in:
Brendan Dahl 2013-09-06 08:02:18 -07:00
commit ab4a51584a
2 changed files with 14 additions and 7 deletions

View File

@ -571,15 +571,23 @@ var TextAnnotation = (function TextAnnotationClosure() {
e.appendChild(document.createElement('br'));
}
text.appendChild(e);
image.addEventListener('mouseover', function annotationImageOver() {
var showAnnotation = function showAnnotation() {
container.style.zIndex += 1;
content.removeAttribute('hidden');
}, false);
};
image.addEventListener('mouseout', function annotationImageOut() {
container.style.zIndex -= 1;
content.setAttribute('hidden', true);
}, false);
var hideAnnotation = function hideAnnotation(e) {
if (e.toElement || e.relatedTarget) { // No context menu is used
container.style.zIndex -= 1;
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);

View File

@ -1259,7 +1259,6 @@ canvas {
}
.annotText > img:hover {
cursor: pointer;
opacity: 1;
}