aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentBox.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-05-01 01:46:07 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-05-01 01:46:07 -0400
commitff7c7d40b1fcdf74b539c7d97f36707ff1521d2e (patch)
treebb5015340d191f1374ad682ee0326a8905c58e59 /src/client/views/nodes/DocumentBox.tsx
parent4bfd44048bb9791e11f4f817077227a4d5de3b7f (diff)
fixed presentations to allow drag and drop. fixed pres box to use RenderData instead of modifying presentation elements with unnecessary info like their containing PresBox and their presentation index position. COnverted COntentFIttingDocumentView to use DocumentView's props
Diffstat (limited to 'src/client/views/nodes/DocumentBox.tsx')
-rw-r--r--src/client/views/nodes/DocumentBox.tsx15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/client/views/nodes/DocumentBox.tsx b/src/client/views/nodes/DocumentBox.tsx
index d4d997120..88eeb1137 100644
--- a/src/client/views/nodes/DocumentBox.tsx
+++ b/src/client/views/nodes/DocumentBox.tsx
@@ -6,7 +6,7 @@ import { documentSchema } from "../../../new_fields/documentSchemas";
import { makeInterface } from "../../../new_fields/Schema";
import { ComputedField } from "../../../new_fields/ScriptField";
import { Cast, NumCast, StrCast } from "../../../new_fields/Types";
-import { emptyPath } from "../../../Utils";
+import { emptyPath, returnFalse, returnOne, returnZero } from "../../../Utils";
import { ContextMenu } from "../ContextMenu";
import { ContextMenuProps } from "../ContextMenuItem";
import { ViewBoxAnnotatableComponent } from "../DocComponent";
@@ -114,9 +114,10 @@ export class DocHolderBox extends ViewBoxAnnotatableComponent<FieldViewProps, Do
}
const contents = !(containedDoc instanceof Doc) ? (null) : <ContentFittingDocumentView
Document={containedDoc}
- DataDocument={undefined}
+ DataDoc={undefined}
LibraryPath={emptyPath}
- CollectionView={this as any} // bcz: hack! need to pass a prop that can be used to select the container (ie, 'this') when the up selector in document decorations is clicked. currently, the up selector allows only a containing collection to be selected
+ ContainingCollectionView={this as any} // bcz: hack! need to pass a prop that can be used to select the container (ie, 'this') when the up selector in document decorations is clicked. currently, the up selector allows only a containing collection to be selected
+ ContainingCollectionDoc={undefined}
fitToBox={true}
layoutKey={childTemplateName ? "layout_" + childTemplateName : "layout"}
rootSelected={this.props.isSelected}
@@ -125,14 +126,18 @@ export class DocHolderBox extends ViewBoxAnnotatableComponent<FieldViewProps, Do
removeDocument={this.props.removeDocument}
addDocTab={this.props.addDocTab}
pinToPres={this.props.pinToPres}
- getTransform={this.getTransform}
+ ScreenToLocalTransform={this.getTransform}
renderDepth={this.props.renderDepth + 1}
+ NativeHeight={returnZero}
+ NativeWidth={returnZero}
PanelWidth={this.pwidth}
PanelHeight={this.pheight}
focus={this.props.focus}
- active={this.props.active}
+ parentActive={this.props.active}
dontRegisterView={!this.isSelectionLocked()}
whenActiveChanged={this.props.whenActiveChanged}
+ bringToFront={returnFalse}
+ ContentScaling={returnOne}
/>;
return contents;
}