From 55f99f4bcc45b1dc797982273e93f49fb58403c3 Mon Sep 17 00:00:00 2001 From: bobzel Date: Fri, 28 Aug 2020 18:15:46 -0400 Subject: added explicit annotation mode for videos. fixed annotation mode for webpages --- src/client/views/nodes/WebBox.tsx | 85 +++++---------------------------------- 1 file changed, 11 insertions(+), 74 deletions(-) (limited to 'src/client/views/nodes/WebBox.tsx') diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx index 7758b1815..290b4a720 100644 --- a/src/client/views/nodes/WebBox.tsx +++ b/src/client/views/nodes/WebBox.tsx @@ -31,6 +31,7 @@ import { FieldView, FieldViewProps } from './FieldView'; import "./WebBox.scss"; import "../pdf/PDFViewer.scss"; import React = require("react"); +import { Tooltip } from '@material-ui/core'; const htmlToText = require("html-to-text"); type WebDocument = makeInterface<[typeof documentSchema]>; @@ -235,81 +236,16 @@ export class WebBox extends ViewBoxAnnotatableComponent { - this.layoutDoc.isAnnotating = !this.layoutDoc.isAnnotating; - } - - urlEditor() { - return ( -
-
-
- -
-
- -
-
- -
- { - this._keyInput.current!.select(); - e.stopPropagation(); - }} - ref={this._keyInput} - /> -
- - - -
-
-
-
+ editToggleBtn() { + return {`${this.props.Document.isAnnotating ? "Exit" : "Enter"} annotation mode`}
}> +
this.layoutDoc.isAnnotating = !this.layoutDoc.isAnnotating)}> +
- ); + ; } - - @action - toggleCollapse = () => { - this._collapsed = !this._collapsed; - } - - - _ignore = 0; onPreWheel = (e: React.WheelEvent) => { this._ignore = e.timeStamp; @@ -474,7 +410,7 @@ export class WebBox extends ViewBoxAnnotatableComponent {view} - ; + {!frozen ? (null) :
@@ -483,7 +419,6 @@ export class WebBox extends ViewBoxAnnotatableComponent
} - {this.urlEditor()} ); } @@ -741,6 +676,8 @@ export class WebBox extends ViewBoxAnnotatableComponent + + {this.props.isSelected() ? this.editToggleBtn() : null} ); } } \ No newline at end of file -- cgit v1.2.3-70-g09d2