diff options
-rw-r--r-- | src/client/views/nodes/ContentFittingDocumentView.tsx | 2 | ||||
-rw-r--r-- | src/client/views/nodes/PresBox.tsx | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/client/views/nodes/ContentFittingDocumentView.tsx b/src/client/views/nodes/ContentFittingDocumentView.tsx index bc3ad5bce..0c52b9044 100644 --- a/src/client/views/nodes/ContentFittingDocumentView.tsx +++ b/src/client/views/nodes/ContentFittingDocumentView.tsx @@ -40,7 +40,7 @@ export class ContentFittingDocumentView extends React.Component<DocumentViewProp @computed get panelWidth() { return this.nativeWidth() && !this.props.Document._fitWidth ? this.nativeWidth() * this.contentScaling() : this.props.PanelWidth(); } @computed get panelHeight() { if (this.nativeHeight()) { - if (!this.props.Document._fitWidth) return this.nativeHeight() * this.contentScaling() + if (!this.props.Document._fitWidth) return this.nativeHeight() * this.contentScaling(); else return this.panelWidth / Doc.NativeAspect(this.layoutDoc, this.props.DataDoc, this.freezeDimensions) || 1; } return this.props.PanelHeight(); diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx index f8f794a4b..3c40b61f3 100644 --- a/src/client/views/nodes/PresBox.tsx +++ b/src/client/views/nodes/PresBox.tsx @@ -90,7 +90,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema> const tagDocs: Doc[] = []; for (const doc of this.childDocs) { const tagDoc = Cast(doc.presentationTargetDoc, Doc, null); - tagDocs.push(tagDoc) + tagDocs.push(tagDoc); } return tagDocs; } @@ -634,7 +634,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema> const list = Array.from(this._selectedArray.keys()).map((doc: Doc, index: any) => { const curDoc = Cast(doc, Doc, null); const tagDoc = Cast(curDoc.presentationTargetDoc!, Doc, null); - if (curDoc && curDoc === this.activeItem) return <div className="selectedList-items"><b>{index + 1}. {curDoc.title}</b></div> + if (curDoc && curDoc === this.activeItem) return <div className="selectedList-items"><b>{index + 1}. {curDoc.title}</b></div>; else if (tagDoc) return <div className="selectedList-items">{index + 1}. {curDoc.title}</div>; else if (curDoc) return <div className="selectedList-items">{index + 1}. {curDoc.title}</div>; }); @@ -797,10 +797,10 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema> } getAllIndexes = (arr: Doc[], val: Doc): number[] => { - var indexes = [], i; - for (i = 0; i < arr.length; i++) - if (arr[i] === val) - indexes.push(i); + const indexes = []; + for (let i = 0; i < arr.length; i++) { + arr[i] === val && indexes.push(i); + } return indexes; } @@ -936,7 +936,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema> doc.presMovement = PresMovement.None; break; } - }) + }); }); @undoBatch |