aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/IconBox.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-10-01 21:48:15 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-10-01 21:48:15 -0400
commit88b20ece053ae85e541f4903748ee311b9ecf81c (patch)
treecccfa6aaa34948bb158ab8f8d91ab91dc853d06f /src/client/views/nodes/IconBox.tsx
parent128b8f61a8e3c7557bf7c3424a76f9c61ad6a56b (diff)
better fix than last one for icon sizes and default pdf dimensions.
Diffstat (limited to 'src/client/views/nodes/IconBox.tsx')
-rw-r--r--src/client/views/nodes/IconBox.tsx6
1 files changed, 3 insertions, 3 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 }) =>