diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2019-10-01 02:54:03 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2019-10-01 02:54:03 -0400 |
| commit | 9e1234abe64d289927122ad641e3bcaf0b9eaf6e (patch) | |
| tree | da9c36f24bd9792dd867b418a7d397609953ffb2 /src/client/views/presentationview/PresElementBox.tsx | |
| parent | 2a393bd745667fa920d105bf69827c75dc687f08 (diff) | |
bugs, bugs. this time with fittobox when called from schema view which was passing width and height as functions, not values. switched to PanelWidth and PanelHeight
Diffstat (limited to 'src/client/views/presentationview/PresElementBox.tsx')
| -rw-r--r-- | src/client/views/presentationview/PresElementBox.tsx | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/src/client/views/presentationview/PresElementBox.tsx b/src/client/views/presentationview/PresElementBox.tsx index fb9474cde..de3242d32 100644 --- a/src/client/views/presentationview/PresElementBox.tsx +++ b/src/client/views/presentationview/PresElementBox.tsx @@ -15,6 +15,7 @@ import { DocumentView } from "../nodes/DocumentView"; import { FieldView, FieldViewProps } from '../nodes/FieldView'; import "./PresElementBox.scss"; import React = require("react"); +import { CollectionSchemaPreview } from '../collections/CollectionSchemaView'; library.add(faArrowUp); @@ -173,28 +174,23 @@ export class PresElementBox extends React.Component<FieldViewProps> { height: propDocHeight === 0 ? NumCast(this.props.Document.height) - NumCast(this.props.Document.collapsedHeight) : propDocHeight * scale(), width: propDocWidth === 0 ? "auto" : propDocWidth * scale(), }}> - <DocumentView - fitToBox={StrCast(this.props.Document.type).indexOf(DocumentType.COL) !== -1} + <CollectionSchemaPreview + fitToBox={StrCast(this.props.Document.target.type).indexOf(DocumentType.COL) !== -1} Document={this.props.Document.target} addDocument={returnFalse} removeDocument={returnFalse} ruleProvider={undefined} - ScreenToLocalTransform={Transform.Identity} addDocTab={returnFalse} pinToPres={returnFalse} + PanelWidth={() => this.props.PanelWidth() - 20} + PanelHeight={() => 100} + setPreviewScript={emptyFunction} + getTransform={Transform.Identity} + active={this.props.active} + moveDocument={this.props.moveDocument!} renderDepth={1} - PanelWidth={() => 350} - PanelHeight={() => 90} focus={emptyFunction} - backgroundColor={returnEmptyString} - parentActive={returnFalse} whenActiveChanged={returnFalse} - bringToFront={emptyFunction} - zoomToScale={emptyFunction} - getScale={returnOne} - ContainingCollectionView={undefined} - ContainingCollectionDoc={undefined} - ContentScaling={scale} /> <div className="presElementBox-embeddedMask" /> </div> |
