diff options
author | bob <bcz@cs.brown.edu> | 2019-01-31 11:51:01 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-01-31 11:51:01 -0500 |
commit | e882783aeb3e425c339a15d80e602674261d2823 (patch) | |
tree | 6690bf438a94e8ccef7d8edc19b4dd59d85e0bf5 /src/views/nodes/DocumentView.tsx | |
parent | 0493f7f18a3eb49d0443f1742d53bb214bf9dd70 (diff) |
just one more bug to fix with docking...
Diffstat (limited to 'src/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/views/nodes/DocumentView.tsx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/views/nodes/DocumentView.tsx b/src/views/nodes/DocumentView.tsx index 657cd62c9..7e2635438 100644 --- a/src/views/nodes/DocumentView.tsx +++ b/src/views/nodes/DocumentView.tsx @@ -16,12 +16,13 @@ import { FieldTextBox } from "../nodes/FieldTextBox"; import "./NodeView.scss"; import React = require("react"); import { cpus } from "os"; +import { relative } from "path"; const JsxParser = require('react-jsx-parser').default;//TODO Why does this need to be imported like this? interface DocumentViewProps { Document: Document; ContainingCollectionView: Opt<CollectionView>; - ContainingDocumentView: Opt<DocumentView> + ContainingDocumentView: Opt<DocumentView>; } export interface CollectionViewProps { @@ -75,10 +76,7 @@ class DocumentContents extends React.Component<DocumentViewProps> { showWarnings={true} onError={(test: any) => { console.log(test) }} /> - - } - } @observer @@ -232,7 +230,7 @@ export class DocumentView extends React.Component<DocumentViewProps> { this._downX = e.clientX; this._downY = e.clientY; var me = this; - if (e.shiftKey) { + if (e.shiftKey && e.buttons === 1) { CollectionDockingView.StartOtherDrag(this._mainCont.current!, this.props.Document); e.stopPropagation(); return; @@ -320,6 +318,7 @@ export class DocumentView extends React.Component<DocumentViewProps> { transform: freestyling ? this.transform : "", width: freestyling ? this.width : "100%", height: freestyling ? this.height : "100%", + position: freestyling ? "absolute" : "relative", }} onContextMenu={this.onContextMenu} onPointerDown={this.onPointerDown}> |