aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-03-25 23:20:22 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-03-25 23:20:22 -0400
commit2264fb874a09ee01540141986325c76650f32c21 (patch)
tree8e474e1bc794087734afcdb871e1e79d7284060b /src/client/views/collections/CollectionView.tsx
parent31049374ef26d33e9d5304e1975e550d9046a50a (diff)
added 1-level navigation to region annotations
Diffstat (limited to 'src/client/views/collections/CollectionView.tsx')
-rw-r--r--src/client/views/collections/CollectionView.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionView.tsx b/src/client/views/collections/CollectionView.tsx
index a740865ad..2fa2c9086 100644
--- a/src/client/views/collections/CollectionView.tsx
+++ b/src/client/views/collections/CollectionView.tsx
@@ -68,7 +68,11 @@ export class CollectionView extends React.Component<CollectionViewProps> {
@action
public static AddDocument(props: CollectionViewProps, doc: Document, allowDuplicates: boolean): boolean {
- doc.SetNumber(KeyStore.Page, props.Document.GetNumber(KeyStore.CurPage, -1));
+ var curPage = props.Document.GetNumber(KeyStore.CurPage, -1);
+ doc.SetNumber(KeyStore.Page, curPage);
+ if (curPage > 0) {
+ doc.Set(KeyStore.AnnotationOn, props.Document);
+ }
if (props.Document.Get(props.fieldKey) instanceof Field) {
//TODO This won't create the field if it doesn't already exist
const value = props.Document.GetData(props.fieldKey, ListField, new Array<Document>())