aboutsummaryrefslogtreecommitdiff
path: root/src/views/collections/CollectionDockingView.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-02-01 01:16:51 -0500
committerTyler Schicke <tyler_schicke@brown.edu>2019-02-01 01:16:51 -0500
commit4b1e7b1e71f8dbd7a54e2e2f03fcbf813288bc5c (patch)
treeebab66fcf1008b25202d8d07ea5e9e42c301c878 /src/views/collections/CollectionDockingView.tsx
parent2cddac17b405aa85d488f12a0ee5e05ba8698eab (diff)
Deleted unused files and reformatted some files
Diffstat (limited to 'src/views/collections/CollectionDockingView.tsx')
-rw-r--r--src/views/collections/CollectionDockingView.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/views/collections/CollectionDockingView.tsx b/src/views/collections/CollectionDockingView.tsx
index a547ea1e8..c5d4272bf 100644
--- a/src/views/collections/CollectionDockingView.tsx
+++ b/src/views/collections/CollectionDockingView.tsx
@@ -28,7 +28,7 @@ export class CollectionDockingView extends React.Component<CollectionViewProps>
const { fieldKey, Document: Document } = this.props;
const value: Document[] = Document.GetFieldValue(fieldKey, ListField, []);
var docs = value.map(doc => {
- return { type: 'tabset', weight: 50, selected: 0, children: [ { type: "tab", name: doc.Title, component: doc.Id } ] };
+ return { type: 'tabset', weight: 50, selected: 0, children: [{ type: "tab", name: doc.Title, component: doc.Id }] };
});
return FlexLayout.Model.fromJson({
global: {}, borders: [],
@@ -49,7 +49,7 @@ export class CollectionDockingView extends React.Component<CollectionViewProps>
return new GoldenLayout({
settings: {
selectionEnabled: true
- }, content: [ { type: 'row', content: docs } ]
+ }, content: [{ type: 'row', content: docs }]
});
}
constructor(props: CollectionViewProps) {
@@ -122,8 +122,8 @@ export class CollectionDockingView extends React.Component<CollectionViewProps>
const { fieldKey, Document: Document } = this.props;
const value: Document[] = Document.GetFieldValue(fieldKey, ListField, []);
for (var i: number = 0; i < value.length; i++) {
- if (value[ i ].Id === component) {
- return (<DocumentView key={value[ i ].Id} ContainingCollectionView={this} Document={value[ i ]} ContainingDocumentView={this.props.ContainingDocumentView} />);
+ if (value[i].Id === component) {
+ return (<DocumentView key={value[i].Id} ContainingCollectionView={this} Document={value[i]} ContainingDocumentView={this.props.ContainingDocumentView} />);
}
}
if (component === "text") {
@@ -174,7 +174,7 @@ export class CollectionDockingView extends React.Component<CollectionViewProps>
componentState: { doc: dv.props.Document }
};
CollectionDockingView.myLayout._makeFullScreen = true;
- CollectionDockingView.myLayout.root.contentItems[ 0 ].addChild(newItemConfig);
+ CollectionDockingView.myLayout.root.contentItems[0].addChild(newItemConfig);
}
public static CloseFullScreen() {
if (CollectionDockingView.myLayout._maximizedStack != null) {