aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/InkTranscription.tsx15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/client/views/InkTranscription.tsx b/src/client/views/InkTranscription.tsx
index b20fc0b8b..54c899144 100644
--- a/src/client/views/InkTranscription.tsx
+++ b/src/client/views/InkTranscription.tsx
@@ -43,8 +43,8 @@ export class InkTranscription extends React.Component {
protocol: 'WEBSOCKET',
server: {
host: 'cloud.myscript.com',
- applicationKey: '7277ec34-0c2e-4ee1-9757-ccb657e3f89f',
- hmacKey: 'f5cb18f2-1f95-4ddb-96ac-3f7c888dffc1',
+ applicationKey: process.env.IINKJS_APP,
+ hmacKey: process.env.IINKJS_HMAC,
websocket: {
pingEnabled: false,
autoReconnect: true
@@ -110,12 +110,8 @@ export class InkTranscription extends React.Component {
const strokes: InkData[] = [];
const times: number[] = [];
- // console.log(validInks);
validInks.filter(i => Cast(i.data, InkField)).forEach(i => {
const d = Cast(i.data, InkField, null);
- // const left = Math.min(...d?.inkData.map(pd => pd.X) ?? [0]);
- // const top = Math.min(...d?.inkData.map(pd => pd.Y) ?? [0]);
- // strokes.push(d.inkData.map(pd => ({ X: pd.X + NumCast(i.x) - left, Y: pd.Y + NumCast(i.y) - top })));
const inkStroke = DocumentManager.Instance.getDocumentView(i)?.ComponentView as InkingStroke;
strokes.push(d.inkData.map(pd => (inkStroke.ptToScreen({ X: pd.X, Y: pd.Y }))));
times.push(DateCast(i.creationDate).getDate().getTime());
@@ -125,8 +121,6 @@ export class InkTranscription extends React.Component {
this.containingLayout = containingLayout;
const pointerData = { "events": strokes.map((stroke, i) => this.inkJSON(stroke, times[i])) };
- // console.log(JSON.stringify(pointerData));
- // console.log(pointerData);
const processGestures = false;
if (math) {
@@ -225,18 +219,15 @@ export class InkTranscription extends React.Component {
newCollection.title = word;
}
// nda - bug: when deleting a stroke before leaving writing mode, delete the stroke from unprocessed ink docs
- // console.log(newCollection);
newCollection && docView.props.addDocument?.(newCollection);
});
}
exportInk = (e: any, ref: any) => {
const exports = e.detail.exports;
- // console.log(e);
if (exports) {
if (exports['application/x-latex']) {
const latex = exports['application/x-latex'];
- // console.log(latex);
if (this.currGroup) {
this.currGroup.text = latex;
@@ -282,10 +273,8 @@ export class InkTranscription extends React.Component {
}
}
const text = exports['text/plain'];
- // console.log(text);
if (this.currGroup) {
- // console.log("curr grouping");
this.currGroup.transcription = text;
this.currGroup.title = text.split("\n")[0];
}