aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionView.tsx
diff options
context:
space:
mode:
authorljungster <parkerljung@gmail.com>2022-03-12 07:44:01 -0500
committerljungster <parkerljung@gmail.com>2022-03-12 07:44:01 -0500
commit2c565fd81daca02cabb9598c699cedb7611c3841 (patch)
tree3601c8e3ad80c4becced111f4e8e1c6d674fce11 /src/client/views/collections/CollectionView.tsx
parent1cf7bf9b1a18728eb07950a3f4eafa793e830834 (diff)
attempting to add note-taking
I think this has something to do with the view not being rendered in novice mode. Assuming this is an issue in CollectionMenu.tsx. Essentially what I did was add a note-taking view wherever I found a stacking view (via global search)
Diffstat (limited to 'src/client/views/collections/CollectionView.tsx')
-rw-r--r--src/client/views/collections/CollectionView.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx
index 681a15e3d..6f94efa41 100644
--- a/src/client/views/collections/CollectionView.tsx
+++ b/src/client/views/collections/CollectionView.tsx
@@ -37,9 +37,11 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import './CollectionView.scss';
import { returnEmptyString } from '../../../Utils';
import { InkTool } from '../../../fields/InkField';
+import { CollectionNoteTakingView } from './CollectionNoteTakingView';
export const COLLECTION_BORDER_WIDTH = 2;
const path = require('path');
+//TODO: see everywhere that this exists
export enum CollectionViewType {
Invalid = "invalid",
Freeform = "freeform",
@@ -58,7 +60,8 @@ export enum CollectionViewType {
Map = "map",
Grid = "grid",
Pile = "pileup",
- StackedTimeline = "stacked timeline"
+ StackedTimeline = "stacked timeline",
+ NoteTaking = "notetaking"
}
export interface CollectionViewProps extends FieldViewProps {
isAnnotationOverlay?: boolean; // is the collection an annotation overlay (eg an overlay on an image/video/etc)
@@ -142,6 +145,7 @@ export class CollectionView extends ViewBoxAnnotatableComponent<ViewBoxAnnotatab
case CollectionViewType.Carousel: return <CollectionCarouselView key="collview" {...props} />;
case CollectionViewType.Carousel3D: return <CollectionCarousel3DView key="collview" {...props} />;
case CollectionViewType.Stacking: return <CollectionStackingView key="collview" {...props} />;
+ case CollectionViewType.NoteTaking: return <CollectionNoteTakingView key="collview" {...props} />;
case CollectionViewType.Masonry: return <CollectionStackingView key="collview" {...props} />;
case CollectionViewType.Time: return <CollectionTimeView key="collview" {...props} />;
case CollectionViewType.Grid: return <CollectionGridView key="collview" {...props} />;
@@ -158,6 +162,7 @@ export class CollectionView extends ViewBoxAnnotatableComponent<ViewBoxAnnotatab
subItems.push({ description: "Schema", event: () => func(CollectionViewType.Schema), icon: "th-list" });
subItems.push({ description: "Tree", event: () => func(CollectionViewType.Tree), icon: "tree" });
subItems.push({ description: "Stacking", event: () => func(CollectionViewType.Stacking)._autoHeight = true, icon: "ellipsis-v" });
+ subItems.push({ description: "Note taking", event: () => func(CollectionViewType.NoteTaking)._autoHeight = true, icon: "ellipsis-v" });
subItems.push({ description: "Multicolumn", event: () => func(CollectionViewType.Multicolumn), icon: "columns" });
subItems.push({ description: "Multirow", event: () => func(CollectionViewType.Multirow), icon: "columns" });
subItems.push({ description: "Masonry", event: () => func(CollectionViewType.Masonry), icon: "columns" });