aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
diff options
context:
space:
mode:
authorgeireann <60007097+geireann@users.noreply.github.com>2020-07-26 17:41:01 +0800
committergeireann <60007097+geireann@users.noreply.github.com>2020-07-26 17:41:01 +0800
commitb83a38a3a92c0149562da460ad9c35eaaf3054ec (patch)
tree905f505c47da25601a3bb53b33f0b0a878527a95 /src/client/views/nodes/CollectionFreeFormDocumentView.tsx
parentb9f77b5f539e7b5f44f11e28bd72fefde34fff97 (diff)
download name update
**not part of pres trails**
Diffstat (limited to 'src/client/views/nodes/CollectionFreeFormDocumentView.tsx')
-rw-r--r--src/client/views/nodes/CollectionFreeFormDocumentView.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
index ba9385514..480abdaed 100644
--- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
+++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
@@ -114,10 +114,10 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF
}
public static setupZoom(doc: Doc, zoomProgressivize: boolean = false) {
- let width = new List<number>();
- let height = new List<number>();
- let top = new List<number>();
- let left = new List<number>();
+ const width = new List<number>();
+ const height = new List<number>();
+ const top = new List<number>();
+ const left = new List<number>();
width.push(NumCast(doc.width));
height.push(NumCast(doc.height));
top.push(NumCast(doc.height) / -2);
@@ -176,7 +176,7 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF
NativeWidth={this.NativeWidth}
PanelWidth={this.panelWidth}
PanelHeight={this.panelHeight} />;
- if (this.layoutDoc === PresBox.Instance.childDocs[PresBox.Instance.itemIndex]?.presentationTargetDoc) {
+ if (PresBox.Instance && this.layoutDoc === PresBox.Instance.childDocs[PresBox.Instance.itemIndex]?.presentationTargetDoc) {
const effectProps = {
left: this.layoutDoc.presEffectDirection === 'left',
right: this.layoutDoc.presEffectDirection === 'right',