diff --git a/static/js/annotation.js b/static/js/annotation.js index 01b8582..40af8f0 100644 --- a/static/js/annotation.js +++ b/static/js/annotation.js @@ -6,9 +6,16 @@ oml.ui.annotation = function(annotation, $iframe) { .html(Ox.encodeHTMLEntities(annotation.text).replace(/\n/g, '
')) .on({ click: function(event) { - that.select() + var id + if (event.ctrlKey) { + that.deselect() + id = null + } else { + that.select() + id = annotation.id + } $iframe.postMessage('selectAnnotation', { - id: annotation.id + id: id }) } });