aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionPDFView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-03-14 00:23:39 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-03-14 00:23:39 -0400
commit100156a0cb778694455a04c8e254054b79f6a06f (patch)
tree6418bcc043ace5400c1ce0c1e372c89fc596b215 /src/client/views/collections/CollectionPDFView.tsx
parenta7952cb33a695d7dd1dc89f5ffe0a98a2e0dfeff (diff)
parent41f458fb4f383bfbf8d5b651189c2f4731262ff8 (diff)
Merge branch 'master' into ui_improvements
Diffstat (limited to 'src/client/views/collections/CollectionPDFView.tsx')
-rw-r--r--src/client/views/collections/CollectionPDFView.tsx13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionPDFView.tsx b/src/client/views/collections/CollectionPDFView.tsx
index f22c07060..91ffc9500 100644
--- a/src/client/views/collections/CollectionPDFView.tsx
+++ b/src/client/views/collections/CollectionPDFView.tsx
@@ -18,13 +18,12 @@ export class CollectionPDFView extends React.Component<CollectionViewProps> {
isTopMost={isTopMost} SelectOnLoad={selectOnLoad} BackgroundView={BackgroundView} focus={focus}/>`;
}
- public SelectedDocs: FieldId[] = []
- @action onPageBack = () => this.curPage > 1 ? this.props.Document.SetNumber(KeyStore.CurPage, this.curPage - 1) : 0;
- @action onPageForward = () => this.curPage < this.numPages ? this.props.Document.SetNumber(KeyStore.CurPage, this.curPage + 1) : 0;
+ private get curPage() { return this.props.Document.GetNumber(KeyStore.CurPage, -1); }
+ private get numPages() { return this.props.Document.GetNumber(KeyStore.NumPages, 0); }
+ @action onPageBack = () => this.curPage > 1 ? this.props.Document.SetNumber(KeyStore.CurPage, this.curPage - 1) : -1;
+ @action onPageForward = () => this.curPage < this.numPages ? this.props.Document.SetNumber(KeyStore.CurPage, this.curPage + 1) : -1;
- @computed private get curPage() { return this.props.Document.GetNumber(KeyStore.CurPage, 0); }
- @computed private get numPages() { return this.props.Document.GetNumber(KeyStore.NumPages, 0); }
- @computed private get uIButtons() {
+ private get uIButtons() {
return (
<div className="pdfBox-buttonTray" key="tray">
<button className="pdfButton" onClick={this.onPageBack}>{"<"}</button>
@@ -33,7 +32,7 @@ export class CollectionPDFView extends React.Component<CollectionViewProps> {
}
// "inherited" CollectionView API starts here...
-
+ public SelectedDocs: FieldId[] = []
public active: () => boolean = () => CollectionView.Active(this);
addDocument = (doc: Document): void => { CollectionView.AddDocument(this.props, doc); }