diff options
author | bobzel <zzzman@gmail.com> | 2023-04-28 10:57:37 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2023-04-28 10:57:37 -0400 |
commit | ae038471f7eda76ecd985e277dda2dc6d27a3be7 (patch) | |
tree | 2d044cc851bcc70ba541c00900e06b8bba64ed66 /src/client/views/nodes/DocumentView.tsx | |
parent | becc884883df07635f4619f908747598b3eb86ee (diff) |
fixed open in lightbox from doc decorations. fixed resizing text docs that are not fitWidth => artifact is that pdf's don't preserve aspect until they are resize vertically to establish a nativeHeight unless they are created with nativeHeight set.
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index a25e5c42d..4876ef300 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -215,7 +215,6 @@ export interface DocumentViewProps extends DocumentViewSharedProps { radialMenu?: String[]; LayoutTemplateString?: string; dontCenter?: 'x' | 'y' | 'xy'; - dontScaleFilter?: (doc: Doc) => boolean; // decides whether a document can be scaled to fit its container vs native size with scrolling NativeWidth?: () => number; NativeHeight?: () => number; NativeDimScaling?: () => number; // scaling the DocumentView does to transform its contents into its panel & needed by ScreenToLocal NOTE: Must also be added to FieldViewProps @@ -1341,7 +1340,7 @@ export class DocumentView extends React.Component<DocumentViewProps> { return this.docView?._componentView?.reverseNativeScaling?.() ? 0 : returnVal(this.props.NativeHeight?.(), Doc.NativeHeight(this.layoutDoc, this.props.DataDoc, !this.fitWidth)); } @computed get shouldNotScale() { - return (this.fitWidth && !this.nativeWidth) || this.props.dontScaleFilter?.(this.Document) || [CollectionViewType.Docking].includes(this.Document._viewType as any); + return (this.fitWidth && !this.nativeWidth) || [CollectionViewType.Docking].includes(this.Document._viewType as any); } @computed get effectiveNativeWidth() { return this.shouldNotScale ? 0 : this.nativeWidth || NumCast(this.layoutDoc.width); |