aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/nodes')
-rw-r--r--src/client/views/nodes/IconBox.tsx6
-rw-r--r--src/client/views/nodes/PDFBox.scss2
-rw-r--r--src/client/views/nodes/PDFBox.tsx6
3 files changed, 7 insertions, 7 deletions
diff --git a/src/client/views/nodes/IconBox.tsx b/src/client/views/nodes/IconBox.tsx
index 63a504d1a..f3adade58 100644
--- a/src/client/views/nodes/IconBox.tsx
+++ b/src/client/views/nodes/IconBox.tsx
@@ -77,9 +77,9 @@ export class IconBox extends React.Component<FieldViewProps> {
<div className="iconBox-container" onContextMenu={this.specificContextMenu}>
{this.minimizedIcon}
<Measure offset onResize={(r) => runInAction(() => {
- if (r.offset!.width || BoolCast(this.props.Document.hideLabel)) {
- this.props.Document.nativeWidth = (r.offset!.width + Number(MINIMIZED_ICON_SIZE));
- if (this.props.Document.height === Number(MINIMIZED_ICON_SIZE)) this.props.Document.width = this.props.Document.nativeWidth;
+ if (r.offset!.width || this.props.Document.hideLabel) {
+ this.props.Document.iconWidth = (r.offset!.width + Number(MINIMIZED_ICON_SIZE));
+ if (this.props.Document.height === Number(MINIMIZED_ICON_SIZE)) this.props.Document.width = this.props.Document.iconWidth;
}
})}>
{({ measureRef }) =>
diff --git a/src/client/views/nodes/PDFBox.scss b/src/client/views/nodes/PDFBox.scss
index 6393f21f7..1c1d6ec95 100644
--- a/src/client/views/nodes/PDFBox.scss
+++ b/src/client/views/nodes/PDFBox.scss
@@ -10,7 +10,7 @@
}
.pdfBox-title-outer {
-
+ z-index: 0;
position: absolute;
width: 100%;
height: 100%;
diff --git a/src/client/views/nodes/PDFBox.tsx b/src/client/views/nodes/PDFBox.tsx
index a3b375be7..617b580dd 100644
--- a/src/client/views/nodes/PDFBox.tsx
+++ b/src/client/views/nodes/PDFBox.tsx
@@ -183,15 +183,15 @@ export class PDFBox extends DocComponent<FieldViewProps, PdfDocument>(PdfDocumen
let noPdf = !(pdfUrl instanceof PdfField) || !this._pdf;
if (!noPdf && (this.props.isSelected() || this.props.ScreenToLocalTransform().Scale < 2.5)) this._everActive = true;
return (!this._everActive ?
- <div className="pdfBox-title-outer" style={{ height: this.props.Document.nativeHeight ? undefined : NumCast(this.props.Document.nativeWidth) }} >
- <div className={classname} style={{ zIndex: 0 }}>
+ <div className="pdfBox-title-outer" >
+ <div className={classname} >
<strong className="pdfBox-title" >{` ${this.props.Document.title}`}</strong>
</div>
</div> :
<div className={classname} style={{
transformOrigin: "top left",
width: this.props.Document.fitWidth ? `${100 / this.props.ContentScaling()}%` : undefined,
- height: !this.props.Document.nativeHeight ? NumCast(this.props.Document.nativeWidth) : 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: React.PointerEvent) => {
let hit = document.elementFromPoint(e.clientX, e.clientY);