mirror of
https://github.com/futurepress/epub.js.git
synced 2025-10-03 14:59:18 +02:00
Merge pull request #662 from bdauria/v0.3
Take annotation type in consideration to delete it.
This commit is contained in:
commit
3397c41a6b
1 changed files with 3 additions and 1 deletions
|
@ -74,7 +74,9 @@ class Annotations {
|
||||||
|
|
||||||
if (hash in this._annotations) {
|
if (hash in this._annotations) {
|
||||||
let annotation = this._annotations[hash];
|
let annotation = this._annotations[hash];
|
||||||
|
if (annotation.type !== type) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let contents = this.rendition.getContents();
|
let contents = this.rendition.getContents();
|
||||||
contents.forEach( (content) => {
|
contents.forEach( (content) => {
|
||||||
if (annotation.sectionIndex === content.sectionIndex) {
|
if (annotation.sectionIndex === content.sectionIndex) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue