From ee10e28ba3f7c97b0947e2065d04562e33ed3498 Mon Sep 17 00:00:00 2001
From: Sam Wilkins <samwilkins333@gmail.com>
Date: Fri, 10 Jan 2020 15:33:07 -0500
Subject: multicolumn changes

---
 src/client/views/CollectionMulticolumnView.tsx | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

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

diff --git a/src/client/views/CollectionMulticolumnView.tsx b/src/client/views/CollectionMulticolumnView.tsx
index 8f0ffd3d0..94e86c048 100644
--- a/src/client/views/CollectionMulticolumnView.tsx
+++ b/src/client/views/CollectionMulticolumnView.tsx
@@ -1,8 +1,11 @@
 import { observer } from 'mobx-react';
 import { makeInterface } from '../../new_fields/Schema';
 import { documentSchema } from '../../new_fields/documentSchemas';
-import { CollectionSubView } from './collections/CollectionSubView';
+import { CollectionSubView, SubCollectionViewProps } from './collections/CollectionSubView';
 import { DragManager } from '../util/DragManager';
+import * as React from "react";
+import { Doc } from '../../new_fields/Doc';
+import { NumCast } from '../../new_fields/Types';
 
 type MulticolumnDocument = makeInterface<[typeof documentSchema]>;
 const MulticolumnDocument = makeInterface(documentSchema);
@@ -10,6 +13,12 @@ const MulticolumnDocument = makeInterface(documentSchema);
 @observer
 export default class CollectionMulticolumnView extends CollectionSubView(MulticolumnDocument) {
 
+    constructor(props: Readonly<SubCollectionViewProps>) {
+        super(props);
+        const { Document } = this.props;
+        Document.multicolumnData = new Doc();
+    }
+
     private _dropDisposer?: DragManager.DragDropDisposer;
     protected createDropTarget = (ele: HTMLDivElement) => { //used for stacking and masonry view
         this._dropDisposer && this._dropDisposer();
@@ -18,8 +27,18 @@ export default class CollectionMulticolumnView extends CollectionSubView(Multico
         }
     }
 
+    public isCurrent(doc: Doc) { return !doc.isMinimized && (Math.abs(NumCast(doc.displayTimecode, -1) - NumCast(this.Document.currentTimecode, -1)) < 1.5 || NumCast(doc.displayTimecode, -1) === -1); }
+
     render() {
-        return null;
+        return (
+            <div className={"collectionMulticolumnView_outer"}>
+                <div className={"collectionMulticolumnView_contents"}>
+                    {this.childLayoutPairs.filter(pair => this.isCurrent(pair.layout)).map(({ layout, data }) => {
+
+                    })}
+                </div>
+            </div>
+        );
     }
 
 }
\ No newline at end of file
-- 
cgit v1.2.3-70-g09d2

