aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSchemaView.tsx
diff options
context:
space:
mode:
authorfawn <fangrui_tong@brown.edu>2019-07-30 18:54:25 -0400
committerfawn <fangrui_tong@brown.edu>2019-07-30 18:54:25 -0400
commitb1848431fe96e2653590864cbf2127e1904df47b (patch)
tree3de2cbe9b983d3af6c22197bf59bd76113975693 /src/client/views/collections/CollectionSchemaView.tsx
parentf73d1eabb7ce1fb49b35c8b2ce7be585d93b22ea (diff)
code cleaning
Diffstat (limited to 'src/client/views/collections/CollectionSchemaView.tsx')
-rw-r--r--src/client/views/collections/CollectionSchemaView.tsx16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx
index a666a428b..0a77008ec 100644
--- a/src/client/views/collections/CollectionSchemaView.tsx
+++ b/src/client/views/collections/CollectionSchemaView.tsx
@@ -44,7 +44,6 @@ export enum ColumnType {
String,
Boolean,
Doc,
- // Checkbox
}
// this map should be used for keys that should have a const type of value
const columnTypes: Map<string, ColumnType> = new Map([
@@ -75,14 +74,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
super.CreateDropTarget(ele);
}
- // detectClick = (e: PointerEvent): void => {
- // if (this._node && this._node.contains(e.target as Node)) {
- // } else {
- // this._isOpen = false;
- // this.props.setIsEditing(false);
- // }
- // }
-
isFocused = (doc: Doc): boolean => {
if (!this.props.isSelected()) return false;
return doc === this._focusedTable;
@@ -119,8 +110,6 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
let movedWidth = this.props.ScreenToLocalTransform().transformDirection(nativeWidth.right - e.clientX, 0)[0];
let width = movedWidth < minWidth ? minWidth : movedWidth > maxWidth ? maxWidth : movedWidth;
this.props.Document.schemaPreviewWidth = width;
- // this.props.Document.schemaPreviewWidth = Math.min(nativeWidth.right - nativeWidth.left - 40,
- // this.props.ScreenToLocalTransform().transformDirection(nativeWidth.right - e.clientX, 0)[0]);
}
@action
onDividerUp = (e: PointerEvent): void => {
@@ -257,7 +246,6 @@ export interface SchemaTableProps {
deleteDocument: (document: Doc) => boolean;
moveDocument: (document: Doc, targetCollection: Doc, addDocument: (document: Doc) => boolean) => boolean;
ScreenToLocalTransform: () => Transform;
- // CreateDropTarget: (ele: HTMLDivElement)=> void; // super createdriotarget
active: () => boolean;
onDrop: (e: React.DragEvent<Element>, options: DocumentOptions, completed?: (() => void) | undefined) => void;
addDocTab: (document: Doc, dataDoc: Doc | undefined, where: string) => void;
@@ -269,7 +257,6 @@ export interface SchemaTableProps {
@observer
export class SchemaTable extends React.Component<SchemaTableProps> {
- // private _mainCont?: HTMLDivElement;
private DIVIDER_WIDTH = 4;
@observable _headerIsEditing: boolean = false;
@@ -499,7 +486,6 @@ export class SchemaTable extends React.Component<SchemaTableProps> {
@action
setCellIsEditing = (isEditing: boolean): void => {
- console.log("SET CELL IS EDITING", isEditing);
this._cellIsEditing = isEditing;
}
@@ -739,8 +725,6 @@ export class SchemaTable extends React.Component<SchemaTableProps> {
@computed
get reactTable() {
let children = this.childDocs;
-
- // let previewWidth = this.previewWidth(); // + 2 * this.borderWidth + this.DIVIDER_WIDTH + 1;
let hasCollectionChild = children.reduce((found, doc) => found || doc.type === "collection", false);
let expandedRowsList = this._openCollections.map(col => children.findIndex(doc => doc[Id] === col).toString());
let expanded = {};