mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
Update annotation remove and always add default theme
This commit is contained in:
parent
837775b2cf
commit
6401485f48
6 changed files with 41 additions and 8 deletions
|
@ -69,9 +69,9 @@ class Annotations {
|
|||
return annotation;
|
||||
}
|
||||
|
||||
remove (cfiRange) {
|
||||
let hash = decodeURI(cfiRange);
|
||||
let result;
|
||||
remove (cfiRange, type) {
|
||||
let hash = encodeURI(cfiRange);
|
||||
|
||||
if (hash in this._annotations) {
|
||||
let annotation = this._annotations[hash];
|
||||
|
||||
|
@ -84,7 +84,6 @@ class Annotations {
|
|||
|
||||
delete this._annotations[hash];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
highlight (cfiRange, data, cb) {
|
||||
|
@ -177,6 +176,7 @@ class Annotation {
|
|||
|
||||
detach (contents) {
|
||||
let {cfiRange, type} = this;
|
||||
let result;
|
||||
|
||||
if (contents) {
|
||||
if (type === "highlight") {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue