diff options
| author | Andrew Kim <andrewdkim@users.noreply.github.com> | 2019-02-26 19:20:23 -0500 |
|---|---|---|
| committer | Andrew Kim <andrewdkim@users.noreply.github.com> | 2019-02-26 19:20:23 -0500 |
| commit | 094b766c7d3097180a6022273001d08672456ef8 (patch) | |
| tree | fe75302bf0ea6675356ca7b00529f9f25ab543f5 /src/views/nodes/Annotation.tsx | |
| parent | 0fce0d7db0986f31a4f1013e42609da382c027e1 (diff) | |
transition from ImageBox to PDFNode. Annotations also now indexable per page, similar to stickies/area selection
Diffstat (limited to 'src/views/nodes/Annotation.tsx')
| -rw-r--r-- | src/views/nodes/Annotation.tsx | 12 |
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(); + + } } |
