diff options
author | bob <bcz@cs.brown.edu> | 2019-09-25 11:03:11 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-09-25 11:03:11 -0400 |
commit | b57741dbed846313e1b9d0dad3b6c8add2566277 (patch) | |
tree | 8922b014d31405fb6f3221cd4638f4104530b504 /src/client/views/nodes/PDFBox.tsx | |
parent | 1a12483b52c27259f0f2762d4369a79e1397af9c (diff) |
fixing up pdf rendering...
Diffstat (limited to 'src/client/views/nodes/PDFBox.tsx')
-rw-r--r-- | src/client/views/nodes/PDFBox.tsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx index 8471aefe0..a582ef2cc 100644 --- a/src/client/views/nodes/PDFBox.tsx +++ b/src/client/views/nodes/PDFBox.tsx @@ -176,10 +176,12 @@ export class PDFBox extends DocComponent<FieldViewProps, PdfDocument>(PdfDocumen let classname = "pdfBox-cont" + (this.props.active() && !InkingControl.Instance.selectedTool && !this._alt ? "-interactive" : ""); return (!(pdfUrl instanceof PdfField) || !this._pdf ? <div>{`pdf, ${this.dataDoc[this.props.fieldKey]}, not found`}</div> : - <div className={classname} - onScroll={this.onScroll} - style={{ marginTop: `${(this.Document.panY || 0)}px` }} - ref={this._mainCont}> + <div className={classname} onWheel={(e: React.WheelEvent) => e.stopPropagation()} onPointerDown={(e: React.PointerEvent) => { + let hit = document.elementFromPoint(e.clientX, e.clientY); + if (hit && hit.localName === "span") { + e.button === 0 && e.stopPropagation(); + } + }}> <PDFViewer pdf={this._pdf} url={pdfUrl.url.pathname} active={this.props.active} scrollTo={this.scrollTo} loaded={this.loaded} panY={this.Document.panY || 0} Document={this.props.Document} DataDoc={this.dataDoc} addDocTab={this.props.addDocTab} setPanY={this.setPanY} GoToPage={this.GotoPage} |