diff options
Diffstat (limited to 'src/client/views/Main.tsx')
-rw-r--r-- | src/client/views/Main.tsx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx index 5ff16b8dc..63cc785e0 100644 --- a/src/client/views/Main.tsx +++ b/src/client/views/Main.tsx @@ -23,6 +23,7 @@ import { observer } from 'mobx-react'; import { Field, Opt } from '../../fields/Field'; import { InkingControl } from './InkingControl'; import { RouteStore } from '../../server/RouteStore'; +import { json } from 'body-parser'; @observer export class Main extends React.Component { @@ -43,6 +44,7 @@ export class Main extends React.Component { } initEventListeners = () => { + // window.addEventListener("pointermove", (e) => this.reportLocation(e)) window.addEventListener("drop", (e) => e.preventDefault(), false) // drop event handler window.addEventListener("dragover", (e) => e.preventDefault(), false) // drag event handler // click interactions for the context menu @@ -71,6 +73,24 @@ export class Main extends React.Component { }); } + // reportLocation = (e: PointerEvent) => { + // request.post(this.prepend(RouteStore.updateCursor), { + // body: { + // cursorX: e.screenX, + // cursorY: e.screenY, + // docId: this.mainContainer ? this.mainContainer.Id : undefined + // }, + // json: true + // }); + // } + + // componentWillUnmount = () => { + + // } + + // pushCursor = () => { + // } + @action createNewWorkspace = (init: boolean): void => { let mainDoc = Documents.DockDocument(JSON.stringify({ content: [{ type: 'row', content: [] }] }), { title: `Main Container ${this.userWorkspaces.length + 1}` }); @@ -108,6 +128,7 @@ export class Main extends React.Component { }); this.mainContainer = doc; this.mainContainer.GetAsync(KeyStore.ActiveFrame, field => this.mainfreeform = field as Document); + // this.pushCursor(); } toggleWorkspaces = () => { |