aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSchemaView.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-02-22 03:01:30 -0500
committerTyler Schicke <tyler_schicke@brown.edu>2019-02-22 03:01:30 -0500
commitfed460a9dffd85b32e30aeb112f2c7c47371bce6 (patch)
tree16f8c1d9b4a5e3e4e1b22e6b6520b793801c8b28 /src/client/views/collections/CollectionSchemaView.tsx
parent3f9e4363e6601eac175ff71192d414fd6051d921 (diff)
Added CollectionView
Switched sub-collections to not inherit from CollectionViewBase
Diffstat (limited to 'src/client/views/collections/CollectionSchemaView.tsx')
-rw-r--r--src/client/views/collections/CollectionSchemaView.tsx13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx
index 5ec288b13..9405c820f 100644
--- a/src/client/views/collections/CollectionSchemaView.tsx
+++ b/src/client/views/collections/CollectionSchemaView.tsx
@@ -13,12 +13,10 @@ import { EditableView } from "../EditableView";
import { DocumentView } from "../nodes/DocumentView";
import { FieldView, FieldViewProps } from "../nodes/FieldView";
import "./CollectionSchemaView.scss";
-import { CollectionViewBase, COLLECTION_BORDER_WIDTH } from "./CollectionViewBase";
+import { COLLECTION_BORDER_WIDTH, CollectionViewProps, SubCollectionViewProps } from "./CollectionView";
@observer
-export class CollectionSchemaView extends CollectionViewBase {
- public static LayoutString(fieldKey: string = "DataKey") { return CollectionViewBase.LayoutString("CollectionSchemaView", fieldKey); }
-
+export class CollectionSchemaView extends React.Component<SubCollectionViewProps> {
private _mainCont = React.createRef<HTMLDivElement>();
private DIVIDER_WIDTH = 5;
@@ -34,6 +32,7 @@ export class CollectionSchemaView extends CollectionViewBase {
doc: rowProps.value[0],
fieldKey: rowProps.value[1],
isSelected: () => false,
+ select: () => { },
isTopMost: false
}
let contents = (
@@ -112,7 +111,7 @@ export class CollectionSchemaView extends CollectionViewBase {
// e.preventDefault();
// } else
{
- if (e.buttons === 1 && this.active) {
+ if (e.buttons === 1 && this.props.active()) {
e.stopPropagation();
}
}
@@ -145,12 +144,12 @@ export class CollectionSchemaView extends CollectionViewBase {
{({ measureRef }) =>
<div ref={measureRef}>
<DocumentView Document={selected}
- AddDocument={this.addDocument} RemoveDocument={this.removeDocument}
+ AddDocument={this.props.addDocument} RemoveDocument={this.props.removeDocument}
ScreenToLocalTransform={this.getTransform}
Scaling={this._parentScaling}
isTopMost={false}
PanelSize={[this._panelWidth, this._panelHeight]}
- ContainingCollectionView={me} />
+ ContainingCollectionView={this.props.CollectionView} />
</div>
}
</Measure>