diff options
author | bobzel <zzzman@gmail.com> | 2020-12-12 18:38:04 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-12-12 18:38:04 -0500 |
commit | 0aa855ab36ead1e4669f25e2a3604e8941cf2075 (patch) | |
tree | 0ca7ebff6ec6f5bafaf28270f52223f9523ea22a /src/client/views/nodes/DocumentView.tsx | |
parent | f3f93e61f3914bd9fd6e8098a99e552f7860bc5f (diff) |
fixed screenToLocal for documents within ContentFittingDoc collections. fixed embedding documents in texst docs.
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 1b1870f81..97937e3e0 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -93,6 +93,7 @@ export interface DocumentViewProps extends DocumentViewSharedProps { dragDivName?: string; contentPointerEvents?: string; radialMenu?: String[]; + contentFittingScaling?: () => number; LayoutTemplate?: () => Opt<Doc>; contextMenuItems?: () => { script: ScriptField, label: string }[]; onDoubleClick?: () => ScriptField; @@ -128,6 +129,7 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu (this.dataDoc.author === Doc.CurrentUserEmail ? StrCast(Doc.UserDoc().showTitle) : "author;creationDate") : undefined); } + @computed get LocalScaling() { return this.props.ContentScaling() * (this.props.contentFittingScaling?.() || 1); } @computed get topMost() { return this.props.renderDepth === 0; } @computed get freezeDimensions() { return this.props.freezeDimensions; } @computed get nativeWidth() { return returnVal(this.props.NativeWidth?.(), Doc.NativeWidth(this.layoutDoc, this.dataDoc, this.freezeDimensions)); } |