From 2a393bd745667fa920d105bf69827c75dc687f08 Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Tue, 1 Oct 2019 01:33:57 -0400 Subject: final updates to presentation view to improve layout. fixes for chromeHeight --- src/client/views/nodes/PresBox.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/client/views/nodes') diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx index ab777d534..66608fb8d 100644 --- a/src/client/views/nodes/PresBox.tsx +++ b/src/client/views/nodes/PresBox.tsx @@ -42,7 +42,7 @@ export class PresBox extends React.Component { if (value) { value.forEach((item, i) => { if (item instanceof Doc && item.type !== DocumentType.PRESELEMENT) { - let pinDoc = Docs.Create.PresElementBoxDocument(); + let pinDoc = Docs.Create.PresElementBoxDocument({ backgroundColor: "transparent" }); Doc.GetProto(pinDoc).target = item; Doc.GetProto(pinDoc).title = ComputedField.MakeFunction('(this.target instanceof Doc) && this.target.title.toString()'); value.splice(i, 1, pinDoc); @@ -342,7 +342,8 @@ export class PresBox extends React.Component { docList.forEach((doc: Doc) => { doc.presBox = this.props.Document; doc.presBoxKey = this.props.fieldKey; - doc.height = hgt; + doc.collapsedHeight = hgt; + doc.height = ComputedField.MakeFunction("this.collapsedHeight + Number(this.embedOpen ? 100:0)") let curScale = NumCast(doc.viewScale, null); if (curScale === undefined) { doc.viewScale = 1; @@ -356,6 +357,9 @@ export class PresBox extends React.Component { index !== -1 && this.gotoDocument(index, NumCast(this.props.Document.selectedDoc)); } + getTransform = () => { + return this.props.ScreenToLocalTransform().translate(-10, -50);// listBox padding-left and pres-box-cont minHeight + } render() { this.initializeScaleViews(this.childDocs, NumCast(this.props.Document.viewType)); return ( @@ -370,7 +374,7 @@ export class PresBox extends React.Component { {this.props.Document.minimizedView ? (null) :
- +
} -- cgit v1.2.3-70-g09d2