aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
authormadelinegr <monika_hedman@brown.edu>2019-06-11 16:47:15 -0400
committermadelinegr <monika_hedman@brown.edu>2019-06-11 16:47:15 -0400
commite65fba03470cc38bc610baf4ff77fcc13cc08b74 (patch)
treefa2f9c00542802824d06b9ece5ee549df60a8d17 /src/client/views/collections
parentd9de5d5dc660d3c859590ece04fee5613621b56e (diff)
lint errors fixed
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/CollectionBaseView.tsx2
-rw-r--r--src/client/views/collections/CollectionDockingView.tsx3
-rw-r--r--src/client/views/collections/CollectionSchemaView.tsx11
-rw-r--r--src/client/views/collections/CollectionStackingView.tsx4
-rw-r--r--src/client/views/collections/CollectionTreeView.tsx10
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx2
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx2
-rw-r--r--src/client/views/collections/collectionFreeForm/MarqueeView.tsx2
8 files changed, 17 insertions, 19 deletions
diff --git a/src/client/views/collections/CollectionBaseView.tsx b/src/client/views/collections/CollectionBaseView.tsx
index 5238ad114..1e42593d1 100644
--- a/src/client/views/collections/CollectionBaseView.tsx
+++ b/src/client/views/collections/CollectionBaseView.tsx
@@ -130,7 +130,7 @@ export class CollectionBaseView extends React.Component<CollectionViewProps> {
@action.bound
removeDocument(doc: Doc): boolean {
- let docView = DocumentManager.Instance.getDocumentView(doc, this.props.ContainingCollectionView)
+ let docView = DocumentManager.Instance.getDocumentView(doc, this.props.ContainingCollectionView);
docView && SelectionManager.DeselectDoc(docView);
const props = this.props;
//TODO This won't create the field if it doesn't already exist
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index 51e29cb54..2bce6103b 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -419,8 +419,7 @@ export class DockedFrameRenderer extends React.Component<DockedFrameProps> {
@observable private _document: Opt<Doc>;
get _stack(): any {
let parent = (this.props as any).glContainer.parent.parent;
- if (this._document && this._document.excludeFromLibrary && parent.parent && parent.parent.contentItems.length > 1)
- return parent.parent.contentItems[1];
+ if (this._document && this._document.excludeFromLibrary && parent.parent && parent.parent.contentItems.length > 1) { return parent.parent.contentItems[1]; }
return parent;
}
constructor(props: any) {
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx
index b9e5a5b65..c886d0f35 100644
--- a/src/client/views/collections/CollectionSchemaView.tsx
+++ b/src/client/views/collections/CollectionSchemaView.tsx
@@ -90,8 +90,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
let columnDocs = DocListCast(schemaDoc.data);
if (columnDocs) {
let ddoc = columnDocs.find(doc => doc.title === columnName);
- if (ddoc)
- return ddoc;
+ if (ddoc) { return ddoc; }
}
}
return this.props.Document;
@@ -288,7 +287,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
}
getPreviewTransform = (): Transform => this.props.ScreenToLocalTransform().translate(
- - this.borderWidth - this.DIVIDER_WIDTH - this.tableWidth, - this.borderWidth);
+ - this.borderWidth - this.DIVIDER_WIDTH - this.tableWidth, - this.borderWidth)
get documentKeysCheckList() {
@@ -337,7 +336,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
columns={this.tableColumns}
column={{ ...ReactTableDefaults.column, Cell: this.renderCell, }}
getTrProps={this.getTrProps}
- />
+ />;
}
@computed
@@ -362,7 +361,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
addDocTab={this.props.addDocTab}
setPreviewScript={this.setPreviewScript}
previewScript={this.previewScript}
- />
+ />;
}
@action
setPreviewScript = (script: string) => {
@@ -410,7 +409,7 @@ export class CollectionSchemaPreview extends React.Component<CollectionSchemaPre
}
private PanelWidth = () => this.nativeWidth * this.contentScaling();
private PanelHeight = () => this.nativeHeight * this.contentScaling();
- private getTransform = () => this.props.getTransform().translate(-this.centeringOffset, 0).scale(1 / this.contentScaling())
+ private getTransform = () => this.props.getTransform().translate(-this.centeringOffset, 0).scale(1 / this.contentScaling());
get centeringOffset() { return (this.props.width() - this.nativeWidth * this.contentScaling()) / 2; }
@action
onPreviewScriptChange = (e: React.ChangeEvent<HTMLInputElement>) => {
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx
index cad7cd50c..0c5d42769 100644
--- a/src/client/views/collections/CollectionStackingView.tsx
+++ b/src/client/views/collections/CollectionStackingView.tsx
@@ -116,7 +116,7 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) {
let childFocus = (doc: Doc) => {
doc.libraryBrush = true;
this.props.focus(this.props.Document); // just focus on this collection, not the underlying document because the API doesn't support adding an offset to focus on and we can't pan zoom our contents to be centered.
- }
+ };
return (<div className="collectionStackingView-masonryDoc"
key={d[Id]}
ref={dref}
@@ -147,7 +147,7 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) {
collapseToPoint={this.collapseToPoint}
/>
</div>);
- })
+ });
}
onContextMenu = (e: React.MouseEvent): void => {
if (!e.isPropagationStopped() && this.props.Document[Id] !== "mainDoc") { // need to test this because GoldenLayout causes a parallel hierarchy in the React DOM for its children and the main document view7
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx
index 8a6764c58..f83fa3b4b 100644
--- a/src/client/views/collections/CollectionTreeView.tsx
+++ b/src/client/views/collections/CollectionTreeView.tsx
@@ -67,8 +67,8 @@ class TreeView extends React.Component<TreeViewProps> {
@undoBatch delete = () => this.props.deleteDoc(this.props.document);
@undoBatch openRight = async () => this.props.addDocTab(this.props.document, "openRight");
- @action onMouseEnter = () => { this._isOver = true; }
- @action onMouseLeave = () => { this._isOver = false; }
+ @action onMouseEnter = () => { this._isOver = true; };
+ @action onMouseLeave = () => { this._isOver = false; };
onPointerEnter = (e: React.PointerEvent): void => {
this.props.active() && (this.props.document.libraryBrush = true);
@@ -89,8 +89,8 @@ class TreeView extends React.Component<TreeViewProps> {
let bounds = this.props.ScreenToLocalTransform().transformPoint(rect.left, rect.top + rect.height / 2);
let before = x[1] < bounds[1];
let inside = x[0] > bounds[0] + 75 || (!before && this._bulletType === BulletType.Collapsible);
- this._header!.current!.className = "treeViewItem-header"
- if (inside && this._bulletType != BulletType.List) this._header!.current!.className = "treeViewItem-header-inside";
+ this._header!.current!.className = "treeViewItem-header";
+ if (inside && this._bulletType !== BulletType.List) this._header!.current!.className = "treeViewItem-header-inside";
else if (before) this._header!.current!.className = "treeViewItem-header-above";
else if (!before) this._header!.current!.className = "treeViewItem-header-below";
e.stopPropagation();
@@ -191,7 +191,7 @@ class TreeView extends React.Component<TreeViewProps> {
if (inside) {
let docList = Cast(this.props.document.data, listSpec(Doc));
if (docList !== undefined) {
- addDoc = (doc: Doc) => { docList && docList.push(doc); return true; }
+ addDoc = (doc: Doc) => { docList && docList.push(doc); return true; };
}
}
let added = false;
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx
index c4dd534ed..be75c6c5c 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormLinksView.tsx
@@ -109,7 +109,7 @@ export class CollectionFreeFormLinksView extends React.Component<CollectionViewP
}
return match || found;
}, false)) {
- drawnPairs.push({ a: possiblePair.a, b: possiblePair.b, l: [connection.l] })
+ drawnPairs.push({ a: possiblePair.a, b: possiblePair.b, l: [connection.l] });
}
});
return drawnPairs;
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 63f24ff53..f382a10db 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -325,7 +325,7 @@ export class CollectionFreeFormView extends CollectionSubView(PanZoomDocument) {
private childViews = () => [
<CollectionFreeFormBackgroundView key="backgroundView" {...this.props} {...this.getDocumentViewProps(this.props.Document)} />,
...this.views
- ];
+ ]
render() {
const containerName = `collectionfreeformview${this.isAnnotationOverlay ? "-overlay" : "-container"}`;
const easing = () => this.props.Document.panTransformType === "Ease";
diff --git a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
index b6c566964..b93b90c72 100644
--- a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
+++ b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx
@@ -312,7 +312,7 @@ export class MarqueeView extends React.Component<MarqueeViewProps>
summary.imageSummary = imageSummary;
this.props.addDocument(imageSummary, false);
}
- })
+ });
newCollection.proto!.summaryDoc = summary;
selected = [newCollection];
newCollection.x = bounds.left + bounds.width;