diff options
author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-05-18 17:16:30 -0400 |
---|---|---|
committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-05-18 17:16:30 -0400 |
commit | 5b4ffd962d7f89a40edcb3409b5904a752f13fbb (patch) | |
tree | e266886c46564ffdfdbb4265672d35b9c346ff6b /src | |
parent | ffecdb309695ac9030626346b21013bcbf2e7731 (diff) |
More debugging
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/CollectionBaseView.tsx | 4 | ||||
-rw-r--r-- | src/client/views/collections/CollectionView.tsx | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionBaseView.tsx b/src/client/views/collections/CollectionBaseView.tsx index 8687442a5..73eb1fbbc 100644 --- a/src/client/views/collections/CollectionBaseView.tsx +++ b/src/client/views/collections/CollectionBaseView.tsx @@ -16,6 +16,7 @@ export enum CollectionViewType { Schema, Docking, Tree, + RealFreeform } export interface CollectionRenderProps { @@ -42,6 +43,9 @@ export class CollectionBaseView extends React.Component<CollectionViewProps> { if (viewField === CollectionViewType.Freeform) { return CollectionViewType.Tree; } + if (viewField === CollectionViewType.RealFreeform) { + return CollectionViewType.Freeform; + } if (viewField !== undefined) { return viewField; } else { diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx index 3d9b4990a..33427a991 100644 --- a/src/client/views/collections/CollectionView.tsx +++ b/src/client/views/collections/CollectionView.tsx @@ -41,6 +41,7 @@ export class CollectionView extends React.Component<FieldViewProps> { onContextMenu = (e: React.MouseEvent): void => { if (!this.isAnnotationOverlay && !e.isPropagationStopped() && this.props.Document[Id] !== CurrentUserUtils.MainDocId) { // need to test this because GoldenLayout causes a parallel hierarchy in the React DOM for its children and the main document view7 ContextMenu.Instance.addItem({ description: "Freeform", event: undoBatch(() => this.props.Document.viewType = CollectionViewType.Freeform), icon: "project-diagram" }); + ContextMenu.Instance.addItem({ description: "Freeform2", event: undoBatch(() => this.props.Document.viewType = CollectionViewType.RealFreeform), icon: "project-diagram" }); ContextMenu.Instance.addItem({ description: "Schema", event: undoBatch(() => this.props.Document.viewType = CollectionViewType.Schema), icon: "project-diagram" }); ContextMenu.Instance.addItem({ description: "Treeview", event: undoBatch(() => this.props.Document.viewType = CollectionViewType.Tree), icon: "tree" }); } |