store annotations in db and sync with peers
This commit is contained in:
parent
131a6a3215
commit
e0cba14d6a
21 changed files with 385 additions and 63 deletions
|
|
@ -22,6 +22,12 @@ Ox.load({
|
|||
} else if (event == 'addAnnotation') {
|
||||
createAnnotation()
|
||||
} else if (event == 'addAnnotations') {
|
||||
if (data.replace) {
|
||||
annotations.forEach(function(a) {
|
||||
reader.rendition.annotations.remove(a.cfiRange)
|
||||
})
|
||||
annotations = []
|
||||
}
|
||||
data.annotations.forEach(function(annotation) {
|
||||
annotations.push(annotation)
|
||||
renderAnnotation(annotation)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue