diff options
author | bobzel <zzzman@gmail.com> | 2020-12-16 00:38:06 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-16 00:38:06 -0500 |
commit | 0f52fdb7dc2555bc2f6797a462d715b0e035eb23 (patch) | |
tree | e8b7664d5e5ab3e9bc9dd7d03ff71a8e0ed134e9 /src/client/views/nodes/DocumentContentsView.tsx | |
parent | 84849091ceaec757e545ab5ea69cd9d6ff46f6d2 (diff) | |
parent | 3fd3a5d8a130b32cd60c30904c3ce1d5d86de825 (diff) |
Merge pull request #941 from browngraphicslab/contentScalingUpdate
Content scaling update
Diffstat (limited to 'src/client/views/nodes/DocumentContentsView.tsx')
-rw-r--r-- | src/client/views/nodes/DocumentContentsView.tsx | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocumentContentsView.tsx b/src/client/views/nodes/DocumentContentsView.tsx index 98a1b026d..f969bee85 100644 --- a/src/client/views/nodes/DocumentContentsView.tsx +++ b/src/client/views/nodes/DocumentContentsView.tsx @@ -108,6 +108,7 @@ export class HTMLtag extends React.Component<HTMLtagProps> { export class DocumentContentsView extends React.Component<DocumentViewProps & FormattedTextBoxProps & { isSelected: (outsideReaction: boolean) => boolean, select: (ctrl: boolean) => void, + scaling?: () => number, layoutKey: string, hideOnLeave?: boolean, makeLink?: () => Opt<Doc>, // function to call when a link is made @@ -138,8 +139,24 @@ export class DocumentContentsView extends React.Component<DocumentViewProps & Fo } CreateBindings(onClick: Opt<ScriptField>, onInput: Opt<ScriptField>): JsxBindings { + const docOnlyProps = [ // these are the properties in DocumentViewProps that need to be removed to pass on only DocumentSharedViewProps to the FieldViews + "freezeDimensions", + "hideTitle", + "treeViewDoc", + "dragDivName", + "contentPointerEvents", + "radialMenu", + "LayoutTemplateString", + "LayoutTemplate", + "ContentScaling", + "contentFittingScaling", + "contextMenuItems", + "onDoubleClick", + "onPointerDown", + "onPointerUp", + ]; const list = { - ...OmitKeys(this.props, ['NativeWidth', 'NativeHeight'], "", (obj: any) => obj.active = this.props.parentActive).omit, + ...OmitKeys(this.props, [...docOnlyProps], "", (obj: any) => obj.active = this.props.parentActive).omit, RootDoc: Cast(this.layoutDoc?.rootDocument, Doc, null) || this.layoutDoc, Document: this.layoutDoc, DataDoc: this.dataDoc, |