diff options
| author | bob <bcz@cs.brown.edu> | 2019-02-19 12:43:46 -0500 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-02-19 12:43:46 -0500 |
| commit | 260e0a361fefea686807d5b1cf8445ddc3f3045c (patch) | |
| tree | 842f14532aee5dbf52b804b317838559296daf9e /src/client/views/nodes | |
| parent | 98f5f8200ad98f93f14eb97af9fdc6619dabe442 (diff) | |
| parent | 39c6ba3292467979e310f3b577041c2f5e38273f (diff) | |
converting main to use a DockingView
Diffstat (limited to 'src/client/views/nodes')
| -rw-r--r-- | src/client/views/nodes/CollectionFreeFormDocumentView.tsx | 2 | ||||
| -rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 9 |
2 files changed, 5 insertions, 6 deletions
diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx index e04135257..bb85f85a3 100644 --- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx +++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx @@ -93,7 +93,7 @@ export class CollectionFreeFormDocumentView extends React.Component<DocumentView backgroundColor: "transparent" }} > - <DocumentView {...this.props} Scaling={this.width / this.nativeWidth} ScreenToLocalTransform={this.getTransform} /> + <DocumentView {...this.props} Scaling={parentScaling} ScreenToLocalTransform={this.getTransform} /> </div> ); } diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index aa85fba03..ee1a835f8 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -122,9 +122,8 @@ export class DocumentView extends React.Component<DocumentViewProps> { onPointerDown = (e: React.PointerEvent): void => { this._downX = e.clientX; this._downY = e.clientY; - var me = this; if (e.shiftKey && e.buttons === 1) { - CollectionDockingView.StartOtherDrag(this._mainCont.current!, this.props.Document); + CollectionDockingView.Instance.StartOtherDrag(this._mainCont.current!, this.props.Document); e.stopPropagation(); return; } @@ -186,7 +185,7 @@ export class DocumentView extends React.Component<DocumentViewProps> { } openRight = (e: React.MouseEvent): void => { - CollectionDockingView.AddRightSplit(this.props.Document); + CollectionDockingView.Instance.AddRightSplit(this.props.Document); } deleteClicked = (e: React.MouseEvent): void => { @@ -196,14 +195,14 @@ export class DocumentView extends React.Component<DocumentViewProps> { } @action fullScreenClicked = (e: React.MouseEvent): void => { - CollectionDockingView.OpenFullScreen(this.props.Document); + CollectionDockingView.Instance.OpenFullScreen(this.props.Document); ContextMenu.Instance.clearItems(); ContextMenu.Instance.addItem({ description: "Close Full Screen", event: this.closeFullScreenClicked }); ContextMenu.Instance.displayMenu(e.pageX - 15, e.pageY - 15) } @action closeFullScreenClicked = (e: React.MouseEvent): void => { - CollectionDockingView.CloseFullScreen(); + CollectionDockingView.Instance.CloseFullScreen(); ContextMenu.Instance.clearItems(); ContextMenu.Instance.addItem({ description: "Full Screen", event: this.fullScreenClicked }) ContextMenu.Instance.displayMenu(e.pageX - 15, e.pageY - 15) |
