diff options
author | bobzel <zzzman@gmail.com> | 2021-09-17 00:17:15 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2021-09-17 00:17:15 -0400 |
commit | e5e046fbf76dad34ef59754b9ed4c2469e5b849f (patch) | |
tree | 429dfb2624fcf8b29ea35bda081306c8fe4fe33d /src | |
parent | 03c0caa35fa4ac63ac3efeb73de145ebd848cc54 (diff) |
fixed being able to create inline (text selection) annotations on web pages
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/nodes/WebBox.tsx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx index cb9256595..96a3ce83b 100644 --- a/src/client/views/nodes/WebBox.tsx +++ b/src/client/views/nodes/WebBox.tsx @@ -539,12 +539,10 @@ export class WebBox extends ViewBoxAnnotatableComponent<ViewBoxAnnotatableProps @computed get annotationLayer() { TraceMobx(); - return !this.inlineTextAnnotations.length ? (null) : - <div className="webBox-annotationLayer" style={{ height: Doc.NativeHeight(this.Document) || undefined }} ref={this._annotationLayer}> - {this.inlineTextAnnotations.sort((a, b) => NumCast(a.y) - NumCast(b.y)).map(anno => - <Annotation {...this.props} fieldKey={this.annotationKey} showInfo={this.showInfo} dataDoc={this.dataDoc} anno={anno} key={`${anno[Id]}-annotation`} />) - } - </div>; + return <div className="webBox-annotationLayer" style={{ height: Doc.NativeHeight(this.Document) || undefined }} ref={this._annotationLayer}> + {this.inlineTextAnnotations.sort((a, b) => NumCast(a.y) - NumCast(b.y)).map(anno => + <Annotation {...this.props} fieldKey={this.annotationKey} showInfo={this.showInfo} dataDoc={this.dataDoc} anno={anno} key={`${anno[Id]}-annotation`} />)} + </div>; } @computed get SidebarShown() { return this._showSidebar || this.layoutDoc._showSidebar ? true : false; } |