From 6c9999efe775c75c217ed19c493dc175c7a556bc Mon Sep 17 00:00:00 2001
From: mehekj <mehek.jethani@gmail.com>
Date: Thu, 28 Apr 2022 17:05:19 -0400
Subject: updated timestamps to creationdate

---
 src/client/views/InkTranscription.tsx | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

(limited to 'src/client/views/InkTranscription.tsx')

diff --git a/src/client/views/InkTranscription.tsx b/src/client/views/InkTranscription.tsx
index a96cda743..df3a1acb3 100644
--- a/src/client/views/InkTranscription.tsx
+++ b/src/client/views/InkTranscription.tsx
@@ -3,7 +3,7 @@ import { action, observable } from 'mobx';
 import * as React from 'react';
 import { Doc, DocListCast } from '../../fields/Doc';
 import { InkData, InkField } from "../../fields/InkField";
-import { Cast, NumCast } from '../../fields/Types';
+import { Cast, DateCast, NumCast } from '../../fields/Types';
 import { DocumentType } from "../documents/DocumentTypes";
 import './InkTranscription.scss';
 import { Utils } from '../../Utils';
@@ -112,14 +112,15 @@ export class InkTranscription extends React.Component {
             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 })));
-            times.push(NumCast(i.creationDate, 1));
+            times.push(DateCast(i.creationDate).getDate().getTime());
         });
 
         this.currGroup = groupDoc;
         this.containingLayout = containingLayout;
 
         const pointerData = { "events": strokes.map((stroke, i) => this.inkJSON(stroke, times[i])) };
-        console.log(JSON.stringify(pointerData));
+        // console.log(JSON.stringify(pointerData));
+        // console.log(pointerData);
         const processGestures = false;
 
         if (math) {
@@ -163,6 +164,10 @@ export class InkTranscription extends React.Component {
                 const text = exports['text/plain'];
                 // console.log(text);
 
+                if (exports['application/vnd.myscript.jiix']) {
+                    console.log(JSON.parse(exports['application/vnd.myscript.jiix']));
+                }
+
                 if (this.currGroup) {
                     this.currGroup.text = text;
                     this.currGroup.title = text.split("\n")[0];
-- 
cgit v1.2.3-70-g09d2

