deselect annotation
This commit is contained in:
parent
46e679f2b9
commit
81e943625d
1 changed files with 9 additions and 2 deletions
|
@ -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
|
||||
})
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue