aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/client')
-rw-r--r--src/client/cognitive_services/CognitiveServices.ts11
-rw-r--r--src/client/views/DocumentDecorations.tsx2
-rw-r--r--src/client/views/InkTranscription.scss8
-rw-r--r--src/client/views/InkTranscription.tsx6
-rw-r--r--src/client/views/nodes/ScreenshotBox.tsx2
5 files changed, 7 insertions, 22 deletions
diff --git a/src/client/cognitive_services/CognitiveServices.ts b/src/client/cognitive_services/CognitiveServices.ts
index 9f46b8685..9808b6a01 100644
--- a/src/client/cognitive_services/CognitiveServices.ts
+++ b/src/client/cognitive_services/CognitiveServices.ts
@@ -46,15 +46,14 @@ export enum Confidence {
export namespace CognitiveServices {
const ExecuteQuery = async <D>(service: Service, manager: APIManager<D>, data: D): Promise<any> => {
const apiKey = process.env[service.toUpperCase()];
- if (apiKey) {
- console.log(data)
+ if (!apiKey) {
console.log(`No API key found for ${service}: ensure youe root directory has .env file with _CLIENT_${service.toUpperCase()}.`);
return undefined;
}
let results: any;
try {
- results = await manager.requester("has", manager.converter(data), service).then(json => JSON.parse(json));
+ results = await manager.requester(apiKey, manager.converter(data), service).then(json => JSON.parse(json));
} catch (e) {
throw e;
}
@@ -138,12 +137,6 @@ export namespace CognitiveServices {
points: points.map(({ X: x, Y: y }) => `${x},${y}`).join(','),
language: 'en-US',
}));
- console.log(JSON.stringify({
- version: 1,
- language: 'en-US',
- unit: 'mm',
- strokes,
- }))
return JSON.stringify({
version: 1,
language: 'en-US',
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index 09c9936a5..da35459bb 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -878,4 +878,4 @@ export class DocumentDecorations extends ObservableReactComponent<DocumentDecora
</div>
);
}
-} \ No newline at end of file
+}
diff --git a/src/client/views/InkTranscription.scss b/src/client/views/InkTranscription.scss
index 18d6b8b10..c77117ccc 100644
--- a/src/client/views/InkTranscription.scss
+++ b/src/client/views/InkTranscription.scss
@@ -2,9 +2,7 @@
.error-msg {
display: none !important;
}
- .ms-editor{
- .smartguide{
- top:1000px;
- }
+ .ms-editor {
+ top: 1000px;
}
-} \ No newline at end of file
+}
diff --git a/src/client/views/InkTranscription.tsx b/src/client/views/InkTranscription.tsx
index d2589b139..e5f47c1c3 100644
--- a/src/client/views/InkTranscription.tsx
+++ b/src/client/views/InkTranscription.tsx
@@ -40,12 +40,6 @@ export class InkTranscription extends React.Component {
InkTranscription.Instance = this;
}
-
- componentWillUnmount() {
- // this._mathRef.removeEventListener('exported', (e: any) => this.exportInk(e, this._mathRef));
- // this._textRef.removeEventListener('exported', (e: any) => this.exportInk(e, this._textRef));
- }
-
@action
// eslint-disable-next-line @typescript-eslint/no-explicit-any
setMathRef = async (r: any) => {
diff --git a/src/client/views/nodes/ScreenshotBox.tsx b/src/client/views/nodes/ScreenshotBox.tsx
index fd1c791d3..6289470b6 100644
--- a/src/client/views/nodes/ScreenshotBox.tsx
+++ b/src/client/views/nodes/ScreenshotBox.tsx
@@ -149,7 +149,7 @@ export class ScreenshotBox extends ViewBoxAnnotatableComponent<FieldViewProps>()
componentDidMount() {
this.dataDoc.nativeWidth = this.dataDoc.nativeHeight = 0;
- this._props.setContentViewBox?.(this); // this tells the DocumentView that this Box is the "content" of the document. this allows the DocumentView to indirectly call getAnchor() on the AudioBox when making a link.
+ this._props.setContentViewBox?.(this); // this tells the DocumentView that this ScreenshotBox is the "content" of the document. this allows the DocumentView to indirectly call getAnchor() on the AudioBox when making a link.
// this.layoutDoc.videoWall && reaction(() => ({ width: this._props.PanelWidth(), height: this._props.PanelHeight() }),
// ({ width, height }) => {
// if (this._camera) {