aboutsummaryrefslogtreecommitdiff
path: root/src/views/nodes/Annotation.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/views/nodes/Annotation.tsx')
-rw-r--r--src/views/nodes/Annotation.tsx12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/views/nodes/Annotation.tsx b/src/views/nodes/Annotation.tsx
index 6929aea76..0ba05ba3d 100644
--- a/src/views/nodes/Annotation.tsx
+++ b/src/views/nodes/Annotation.tsx
@@ -8,6 +8,7 @@ interface IProps{
Span: HTMLSpanElement;
X: number;
Y: number;
+ Highlights: any[];
}
@@ -47,8 +48,15 @@ export class Annotation extends React.Component<IProps> {
let nodesArray = this.props.Span.parentElement.childNodes;
nodesArray.forEach((e) => {
if (e == this.props.Span){
- if (this.props.Span.parentElement){
- e.remove();
+ if (this.props.Span.parentElement){
+ this.props.Highlights.forEach((item) => {
+ if (item == e){
+ item.remove();
+ }
+ })
+ e.remove();
+
+
}
}