bind events
This commit is contained in:
parent
b509d8f436
commit
ebab25c47d
1 changed files with 6 additions and 2 deletions
|
@ -2,9 +2,13 @@ let txtjs = {}
|
|||
|
||||
Ox.load({UI: {loadCSS: false}}, function() {
|
||||
Ox.$parent.bindMessage(function(data, event) {
|
||||
console.log(event, data)
|
||||
if (event == 'selectAnnotation') {
|
||||
|
||||
txtjs.selectNote(data.id)
|
||||
} else if (event == 'addAnnotations') {
|
||||
data.annotations.forEach(function(note) {
|
||||
txtjs.renderNote(note)
|
||||
txtjs.notes.push(note)
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue