From 73bff98b9476df0ecc91af548d80b30f56967a8d Mon Sep 17 00:00:00 2001 From: bob Date: Thu, 31 Jan 2019 13:19:39 -0500 Subject: working? --- src/Main.tsx | 4 ++-- src/views/collections/CollectionDockingView.tsx | 4 ++++ src/views/nodes/DocumentView.tsx | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Main.tsx b/src/Main.tsx index 2770ccff2..56065b946 100644 --- a/src/Main.tsx +++ b/src/Main.tsx @@ -23,7 +23,7 @@ configure({ const mainNodeCollection = new Array(); let mainContainer = Documents.DockDocument(mainNodeCollection, { - x: 0, y: 0, width: window.screen.width, height: window.screen.height, title: "main container" + x: 0, y: 0, title: "main container" }) window.addEventListener("drop", function (e) { @@ -76,7 +76,7 @@ document.addEventListener("pointerdown", action(function (e: PointerEvent) { //); ReactDOM.render(( -
+
diff --git a/src/views/collections/CollectionDockingView.tsx b/src/views/collections/CollectionDockingView.tsx index b64e4179d..e1d36864f 100644 --- a/src/views/collections/CollectionDockingView.tsx +++ b/src/views/collections/CollectionDockingView.tsx @@ -16,6 +16,7 @@ import 'golden-layout/src/css/goldenlayout-dark-theme.css'; import * as GoldenLayout from "golden-layout"; import * as ReactDOM from 'react-dom'; import { DragManager } from "../../util/DragManager"; +import { CollectionFreeFormView } from "./CollectionFreeFormView"; @observer export class CollectionDockingView extends React.Component { @@ -68,6 +69,9 @@ export class CollectionDockingView extends React.Component componentDidMount: () => void = () => { if (this._containerRef.current && CollectionDockingView.UseGoldenLayout) { this.goldenLayoutFactory(); + window.addEventListener('resize', function (event) { + CollectionDockingView.myLayout.updateSize(window.innerWidth, window.innerHeight); + }); } } private nextId = (function () { var _next_id = 0; return function () { return _next_id++; } })(); diff --git a/src/views/nodes/DocumentView.tsx b/src/views/nodes/DocumentView.tsx index 7e2635438..5e72db492 100644 --- a/src/views/nodes/DocumentView.tsx +++ b/src/views/nodes/DocumentView.tsx @@ -312,7 +312,7 @@ export class DocumentView extends React.Component { render() { - var freestyling = this.props.ContainingCollectionView === undefined || this.props.ContainingCollectionView instanceof CollectionFreeFormView; + var freestyling = this.props.ContainingCollectionView instanceof CollectionFreeFormView; return (