From 53b89dd844d2d0b597694e8f286f6bd19c41b35e Mon Sep 17 00:00:00 2001 From: Bruno Date: Mon, 25 Sep 2017 17:25:42 +0200 Subject: [PATCH] Take annotation type in consideration to delete it. --- src/annotations.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/annotations.js b/src/annotations.js index 43ce376..6d3c006 100644 --- a/src/annotations.js +++ b/src/annotations.js @@ -74,7 +74,9 @@ class Annotations { if (hash in this._annotations) { let annotation = this._annotations[hash]; - + if (annotation.type !== type) { + return; + } let contents = this.rendition.getContents(); contents.forEach( (content) => { if (annotation.sectionIndex === content.sectionIndex) {