diff options
author | bob <bcz@cs.brown.edu> | 2019-11-18 15:08:05 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-11-18 15:08:05 -0500 |
commit | 6ecbfba52bad2dd64e07472b5f4ef06f95b5544b (patch) | |
tree | 527b97635021fa3b2a75737920d9f4150f138806 /src/client/views/nodes/PDFBox.tsx | |
parent | 398d3f307ec177671ba43920258d0f23a58e49f2 (diff) |
changing documentView to ignore transforms -- must be applied by view boxes
Diffstat (limited to 'src/client/views/nodes/PDFBox.tsx')
-rw-r--r-- | src/client/views/nodes/PDFBox.tsx | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx index 8e0515f8a..ecbe2d309 100644 --- a/src/client/views/nodes/PDFBox.tsx +++ b/src/client/views/nodes/PDFBox.tsx @@ -205,14 +205,9 @@ export class PDFBox extends DocAnnotatableComponent<FieldViewProps, PdfDocument> } @computed get renderPdfView() { - trace(); const pdfUrl = Cast(this.dataDoc[this.props.fieldKey], PdfField); let classname = "pdfBox-cont" + (this.active() ? "-interactive" : ""); - return <div className={classname} style={{ - width: this.props.Document.fitWidth ? `${100 / this.props.ContentScaling()}%` : undefined, - height: this.props.Document.fitWidth ? `${100 / this.props.ContentScaling()}%` : undefined, - transform: `scale(${this.props.Document.fitWidth ? this.props.ContentScaling() : 1})` - }} onContextMenu={this.specificContextMenu} onPointerDown={e => { + return <div className={classname} onContextMenu={this.specificContextMenu} onPointerDown={e => { let hit = document.elementFromPoint(e.clientX, e.clientY); if (hit && hit.localName === "span" && this.props.isSelected()) { // drag selecting text stops propagation e.button === 0 && e.stopPropagation(); |