diff options
| author | _stanleyyip <33562077+yipstanley@users.noreply.github.com> | 2019-05-14 16:02:37 -0400 |
|---|---|---|
| committer | _stanleyyip <33562077+yipstanley@users.noreply.github.com> | 2019-05-14 16:02:37 -0400 |
| commit | 6df3143ead642356b7823946e9710f840f3faa5a (patch) | |
| tree | 2bc788232476db3844976979b86658e764656a03 /src/client/views/pdf/PDFBox2.tsx | |
| parent | b9d32e8e07137484c57f3d1ab89090b27d56cfe6 (diff) | |
argh
Diffstat (limited to 'src/client/views/pdf/PDFBox2.tsx')
| -rw-r--r-- | src/client/views/pdf/PDFBox2.tsx | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/client/views/pdf/PDFBox2.tsx b/src/client/views/pdf/PDFBox2.tsx new file mode 100644 index 000000000..c3f5c19d8 --- /dev/null +++ b/src/client/views/pdf/PDFBox2.tsx @@ -0,0 +1,26 @@ +import React = require("react"); +import { FieldViewProps, FieldView } from "../nodes/FieldView"; +import { DocComponent } from "../DocComponent"; +import { makeInterface } from "../../../new_fields/Schema"; +import { positionSchema } from "../nodes/DocumentView"; +import { pageSchema } from "../nodes/ImageBox"; +import { PDFViewer } from "./PDFViewer"; +import { RouteStore } from "../../../server/RouteStore"; +import { InkingControl } from "../InkingControl"; +import { observer } from "mobx-react"; + +type PdfDocument = makeInterface<[typeof positionSchema, typeof pageSchema]>; +const PdfDocument = makeInterface(positionSchema, pageSchema); + +@observer +export class PDFBox2 extends DocComponent<FieldViewProps, PdfDocument>(PdfDocument) { + public static LayoutString() { return FieldView.LayoutString(PDFBox2); } + + render() { + const pdfUrl = "https://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf"; + let classname = "pdfBox-cont" + (this.props.isSelected() && !InkingControl.Instance.selectedTool); + return ( + <PDFViewer url={pdfUrl} /> + ) + } +}
\ No newline at end of file |
