aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/PDFBox.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-10-01 10:12:50 -0400
committerbob <bcz@cs.brown.edu>2019-10-01 10:12:50 -0400
commitfaaff9fe8aab3bd5d116eab8bd85198a0756fe30 (patch)
treebbfcaf95e462b298aa7645049443ad9932f780a8 /src/client/views/nodes/PDFBox.tsx
parent9e1234abe64d289927122ad641e3bcaf0b9eaf6e (diff)
fixed issues with pdf loading and layout.
Diffstat (limited to 'src/client/views/nodes/PDFBox.tsx')
-rw-r--r--src/client/views/nodes/PDFBox.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx
index fe71e76fd..3014af944 100644
--- a/src/client/views/nodes/PDFBox.tsx
+++ b/src/client/views/nodes/PDFBox.tsx
@@ -180,8 +180,9 @@ export class PDFBox extends DocComponent<FieldViewProps, PdfDocument>(PdfDocumen
render() {
const pdfUrl = Cast(this.dataDoc[this.props.fieldKey], PdfField);
let classname = "pdfBox-cont" + (InkingControl.Instance.selectedTool || !this.active ? "" : "-interactive");
- return (!(pdfUrl instanceof PdfField) || !this._pdf ?
- <div>{`pdf, ${this.dataDoc[this.props.fieldKey]}, not found`}</div> :
+ return (!(pdfUrl instanceof PdfField) || !this._pdf || this.props.ScreenToLocalTransform().Scale > 6 ?
+ <div className="pdfBox-title-outer"><div className="pdfBox-title-cont" >
+ <strong className="pdfBox-title" >{` ${this.props.Document.title}`}</strong> </div></div> :
<div className={classname} onContextMenu={this.specificContextMenu} onPointerDown={(e: React.PointerEvent) => {
let hit = document.elementFromPoint(e.clientX, e.clientY);
if (hit && hit.localName === "span" && this.props.isSelected()) { // drag selecting text stops propagation