From 2f5051296883d3473e2eb1df648d27a0102d04ed Mon Sep 17 00:00:00 2001 From: bobzel Date: Thu, 11 Mar 2021 21:48:28 -0500 Subject: fixed display of aliases in filesys tree view. fixed dropping of "proto" dropAction to move, not copy them in file sys. fixed stacking view to allow for a stacking sidebar in PDFs and then properly support fitWidth (and not) for items in the sidebar. --- src/client/views/pdf/PDFViewer.tsx | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'src/client/views/pdf') diff --git a/src/client/views/pdf/PDFViewer.tsx b/src/client/views/pdf/PDFViewer.tsx index c134ac8d4..d2fa1089e 100644 --- a/src/client/views/pdf/PDFViewer.tsx +++ b/src/client/views/pdf/PDFViewer.tsx @@ -36,7 +36,7 @@ export const pageSchema = createSchema({ _curPage: "number", rotation: "number", scrollHeight: "number", - serachMatch: "boolean" + serachMatch: "boolean", }); //pdfjsLib.GlobalWorkerOptions.workerSrc = `/assets/pdf.worker.js`; @@ -54,6 +54,7 @@ interface IViewerProps extends FieldViewProps { isChildActive: (outsideReaction?: boolean) => boolean; setPdfViewer: (view: PDFViewer) => void; ContentScaling?: () => number; + sidebarWidth: () => number; } /** @@ -550,21 +551,23 @@ export class PDFViewer extends ViewBoxAnnotatableComponent this._zoomed; render() { TraceMobx(); - return
600) ? Doc.NativeWidth(this.props.Document) : `${100 / this.contentScaling}%`, - height: !this.props.Document._fitWidth && (window.screen.width > 600) ? Doc.NativeHeight(this.props.Document) : `${100 / this.contentScaling}%`, - transform: `scale(${this.contentScaling})` - }} > - {this.pdfViewerDiv} - {this.annotationLayer} - {this.overlayLayer} + return
+
600) ? Doc.NativeWidth(this.props.Document) - this.props.sidebarWidth() / this.contentScaling : `calc(${100 / this.contentScaling}% - ${this.props.sidebarWidth() / this.contentScaling}px)`, + height: !this.props.Document._fitWidth && (window.screen.width > 600) ? Doc.NativeHeight(this.props.Document) : `${100 / this.contentScaling}%`, + transform: `scale(${this.contentScaling})` + }} > + {this.pdfViewerDiv} + {this.annotationLayer} + {this.overlayLayer} +
{this.overlayInfo} {this.standinViews} {!this._marqueeing || !this._mainCont.current || !this._annotationLayer.current ? (null) : } -
; +
; } } \ No newline at end of file -- cgit v1.2.3-70-g09d2