From 0103346e8bae5113f5ea6f34d2745addac3a192e Mon Sep 17 00:00:00 2001 From: Tyler Schicke Date: Sat, 11 May 2019 22:55:44 -0400 Subject: Changed measure params that we use --- src/client/views/Main.tsx | 2 +- src/client/views/collections/CollectionDockingView.tsx | 2 +- src/client/views/nodes/IconBox.tsx | 2 +- src/client/views/nodes/PDFBox.tsx | 4 ++-- src/client/views/nodes/VideoBox.tsx | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx index c9d5c395c..158de31f5 100644 --- a/src/client/views/Main.tsx +++ b/src/client/views/Main.tsx @@ -180,7 +180,7 @@ export class Main extends React.Component { let pheightFunc = () => this.pheight; let noScaling = () => 1; let mainCont = this.mainContainer; - return { this.pwidth = r.entry.width; this.pheight = r.entry.height; })}> + return { this.pwidth = r.offset.width; this.pheight = r.offset.height; })}> {({ measureRef }) =>
{!mainCont ? (null) : diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index 5ee943da9..efcee9c02 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -419,7 +419,7 @@ export class DockedFrameRenderer extends React.Component { render() { let theContent = this.content; return !this._document ? (null) : - { this._panelWidth = r.entry.width; this._panelHeight = r.entry.height; })}> + { this._panelWidth = r.offset.width; this._panelHeight = r.offset.height; })}> {({ measureRef }) =>
{theContent}
}
; } diff --git a/src/client/views/nodes/IconBox.tsx b/src/client/views/nodes/IconBox.tsx index 48aecdcd0..071930633 100644 --- a/src/client/views/nodes/IconBox.tsx +++ b/src/client/views/nodes/IconBox.tsx @@ -59,7 +59,7 @@ export class IconBox extends React.Component { return (
{this.minimizedIcon} - runInAction(() => { if (r.entry.width || BoolCast(this.props.Document.hideLabel)) this.props.Document.nativeWidth = this.props.Document.width = (r.entry.width + Number(MINIMIZED_ICON_SIZE)); })}> + runInAction(() => { if (r.offset!.width || BoolCast(this.props.Document.hideLabel)) this.props.Document.nativeWidth = this.props.Document.width = (r.offset!.width + Number(MINIMIZED_ICON_SIZE)); })}> {({ measureRef }) => {label} } diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx index caa66cbeb..f2fa6f47c 100644 --- a/src/client/views/nodes/PDFBox.tsx +++ b/src/client/views/nodes/PDFBox.tsx @@ -279,7 +279,7 @@ export class PDFBox extends DocComponent(PdfDocumen // so this design is flawed. var nativeWidth = FieldValue(this.Document.nativeWidth, 0); if (!FieldValue(this.Document.nativeHeight, 0)) { - var nativeHeight = nativeWidth * r.entry.height / r.entry.width; + var nativeHeight = nativeWidth * r.offset.height / r.offset.width; this.props.Document.height = nativeHeight / nativeWidth * FieldValue(this.Document.width, 0); this.props.Document.nativeHeight = nativeHeight; } @@ -297,7 +297,7 @@ export class PDFBox extends DocComponent(PdfDocumen let xf = FieldValue(this.Document.nativeHeight, 0) / renderHeight; let body = NumCast(this.props.Document.nativeHeight) ? this.pdfPage : - + {({ measureRef }) =>
{this.pdfPage} diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx index 422508f90..97c5d8818 100644 --- a/src/client/views/nodes/VideoBox.tsx +++ b/src/client/views/nodes/VideoBox.tsx @@ -35,7 +35,7 @@ export class VideoBox extends DocComponent(VideoD // bcz: the nativeHeight should really be set when the document is imported. var nativeWidth = FieldValue(this.Document.nativeWidth, 0); var nativeHeight = FieldValue(this.Document.nativeHeight, 0); - var newNativeHeight = nativeWidth * r.entry.height / r.entry.width; + var newNativeHeight = nativeWidth * r.offset.height / r.offset.width; if (!nativeHeight && newNativeHeight !== nativeHeight && !isNaN(newNativeHeight)) { this.Document.height = newNativeHeight / nativeWidth * FieldValue(this.Document.width, 0); this.Document.nativeHeight = newNativeHeight; @@ -71,7 +71,7 @@ export class VideoBox extends DocComponent(VideoD let content = this.videoContent(field.url.href); return NumCast(this.props.Document.nativeHeight) ? content : - + {({ measureRef }) =>
{content} -- cgit v1.2.3-70-g09d2