bind delete in annotation folder
This commit is contained in:
parent
0d76284684
commit
943d117c89
4 changed files with 25 additions and 7 deletions
|
|
@ -49,6 +49,12 @@ oml.ui.annotation = function(annotation, $iframe) {
|
|||
'OxSelectable OMLAnnotation'
|
||||
).css({
|
||||
borderBottom: '1px solid rgb(208, 208, 208)',
|
||||
}).bindEvent({
|
||||
key_delete: function() {
|
||||
that.triggerEvent('delete', {
|
||||
id: annotation.id
|
||||
})
|
||||
}
|
||||
}).append($quote).append($note);
|
||||
|
||||
that.annotate = function() {
|
||||
|
|
@ -63,6 +69,7 @@ oml.ui.annotation = function(annotation, $iframe) {
|
|||
let selected = document.querySelector('.OMLAnnotation.selected')
|
||||
selected && selected.classList.remove('selected')
|
||||
that.addClass('selected')
|
||||
that.gainFocus()
|
||||
}
|
||||
return that;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -63,6 +63,10 @@ oml.ui.viewer = function() {
|
|||
console.log('change...')
|
||||
console.log(annotations)
|
||||
saveAnnotations()
|
||||
},
|
||||
'delete': function(data) {
|
||||
oml.$ui.annotationFolder.find('#a-' + data.id).remove()
|
||||
that.postMessage('removeAnnotation', data)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue