aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionLinear/CollectionLinearView.tsx
diff options
context:
space:
mode:
authormehekj <mehek.jethani@gmail.com>2022-03-17 17:08:25 -0400
committermehekj <mehek.jethani@gmail.com>2022-03-17 17:08:25 -0400
commit1f7cf7babc76ecff5aef5fe663c48e067e85dd26 (patch)
treeadab9947ee887b57f2ff630a78139853b2011f92 /src/client/views/collections/collectionLinear/CollectionLinearView.tsx
parent1e3ad4de06f83eab54628de660529fefb9a0dc63 (diff)
parent73ba1a0395167ab5949f71d0c82fa7188d37ab5c (diff)
Merge remote-tracking branch 'origin/speedups2' into temporalmedia-mehek
Diffstat (limited to 'src/client/views/collections/collectionLinear/CollectionLinearView.tsx')
-rw-r--r--src/client/views/collections/collectionLinear/CollectionLinearView.tsx9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/client/views/collections/collectionLinear/CollectionLinearView.tsx b/src/client/views/collections/collectionLinear/CollectionLinearView.tsx
index 70c8c9436..160134b60 100644
--- a/src/client/views/collections/collectionLinear/CollectionLinearView.tsx
+++ b/src/client/views/collections/collectionLinear/CollectionLinearView.tsx
@@ -4,9 +4,7 @@ import { action, IReactionDisposer, observable, reaction, runInAction } from 'mo
import { observer } from 'mobx-react';
import * as React from 'react';
import { Doc, HeightSym, Opt, WidthSym } from '../../../../fields/Doc';
-import { documentSchema } from '../../../../fields/documentSchemas';
import { Id } from '../../../../fields/FieldSymbols';
-import { makeInterface } from '../../../../fields/Schema';
import { BoolCast, NumCast, ScriptCast, StrCast } from '../../../../fields/Types';
import { emptyFunction, returnEmptyDoclist, returnTrue, Utils } from '../../../../Utils';
import { DocUtils } from '../../../documents/Documents';
@@ -25,9 +23,6 @@ import { CollectionViewType } from '../CollectionView';
import "./CollectionLinearView.scss";
-type LinearDocument = makeInterface<[typeof documentSchema,]>;
-const LinearDocument = makeInterface(documentSchema);
-
/**
* CollectionLinearView is the class for rendering the horizontal collection
* of documents, it useful for horizontal menus. It can either be expandable
@@ -37,7 +32,7 @@ const LinearDocument = makeInterface(documentSchema);
* - It is used for the context sensitive toolbar at the top (see contMenuButtons() in CollectionMenu.tsx)
*/
@observer
-export class CollectionLinearView extends CollectionSubView(LinearDocument) {
+export class CollectionLinearView extends CollectionSubView() {
@observable public addMenuToggle = React.createRef<HTMLInputElement>();
@observable private _selectedIndex = -1;
private _dropDisposer?: DragManager.DragDropDisposer;
@@ -78,7 +73,7 @@ export class CollectionLinearView extends CollectionSubView(LinearDocument) {
{ fireImmediately: true }
);
}
- protected createDashEventsTarget = (ele: HTMLDivElement) => { //used for stacking and masonry view
+ protected createDashEventsTarget = (ele: HTMLDivElement | null) => { //used for stacking and masonry view
this._dropDisposer && this._dropDisposer();
if (ele) {
this._dropDisposer = DragManager.MakeDropTarget(ele, this.onInternalDrop.bind(this), this.layoutDoc);