deselect annotation

This commit is contained in:
j 2019-02-09 17:10:52 +05:30
parent 46e679f2b9
commit 81e943625d
1 changed files with 9 additions and 2 deletions

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
})
}
});