aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/presentationview
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-05-02 19:55:00 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-05-02 19:55:00 -0400
commit585e304c1dc0359184aff2fb4758357143bf1d4a (patch)
tree1d0bf843c492e71e5e9f1e29221bd139f7a0b146 /src/client/views/presentationview
parent18dc6b3c66c28d0e78a579479b80786aa6589970 (diff)
final pres box tweaks so that presentations don't require aliases
Diffstat (limited to 'src/client/views/presentationview')
-rw-r--r--src/client/views/presentationview/PresElementBox.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/presentationview/PresElementBox.tsx b/src/client/views/presentationview/PresElementBox.tsx
index 999f907c9..6d7602268 100644
--- a/src/client/views/presentationview/PresElementBox.tsx
+++ b/src/client/views/presentationview/PresElementBox.tsx
@@ -40,10 +40,10 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc
_heightDisposer: IReactionDisposer | undefined;
// these fields are conditionally computed fields on the layout document that take this document as a parameter
@computed get indexInPres() { return Number(this.lookupField("indexInPres")); } // the index field is where this document is in the presBox display list (since this value is different for each presentation element, the value can't be stored on the layout template which is used by all display elements)
- @computed get collapsedHeight() { return Number(this.lookupField("presCollapsedHeight")); } // the collapsed height changes depending on the state of the presBox. We could store this on the presentation elmeent template if it's guaranteed to be used only once - but if it's shared by different presentations, then this value must be looked up
+ @computed get collapsedHeight() { return Number(this.lookupField("presCollapsedHeight")); } // the collapsed height changes depending on the state of the presBox. We could store this on the presentation elemnt template if it's used by only one presentation - but if it's shared by multiple, then this value must be looked up
@computed get presStatus() { return BoolCast(this.layoutDoc.presStatus); }
@computed get currentIndex() { return NumCast(this.layoutDoc.currentIndex); }
- @computed get targetDoc() { return this.rootDoc.presentationTargetDoc as Doc; }
+ @computed get targetDoc() { return Cast(this.rootDoc.presentationTargetDoc, Doc, null) || this.rootDoc; }
componentDidMount() {
this._heightDisposer = reaction(() => [this.rootDoc.presExpandInlineButton, this.collapsedHeight],