deselect annotation

This commit is contained in:
j 2019-02-09 17:10:52 +05:30
parent 46e679f2b9
commit 81e943625d

View file

@ -6,9 +6,16 @@ oml.ui.annotation = function(annotation, $iframe) {
.html(Ox.encodeHTMLEntities(annotation.text).replace(/\n/g, '<br/>'))
.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
})
}
});