diff options
Diffstat (limited to 'src/client/views/presentationview/PresElementBox.tsx')
-rw-r--r-- | src/client/views/presentationview/PresElementBox.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/presentationview/PresElementBox.tsx b/src/client/views/presentationview/PresElementBox.tsx index dcc5247d5..52773d466 100644 --- a/src/client/views/presentationview/PresElementBox.tsx +++ b/src/client/views/presentationview/PresElementBox.tsx @@ -50,11 +50,11 @@ export class PresElementBox extends DocExtendableComponent<FieldViewProps, PresD public static LayoutString(fieldKey: string) { return FieldView.LayoutString(PresElementBox, fieldKey); } _heightDisposer: IReactionDisposer | undefined; - @computed get indexInPres() { return this.originalLayout?.presBoxKey ? DocListCast(this.presentationDoc[StrCast(this.originalLayout?.presBoxKey)]).indexOf(this.originalLayout) : 0; } + @computed get indexInPres() { return NumCast(this.originalLayout?.presentationIndex); } @computed get presentationDoc() { return Cast(this.originalLayout?.presBox, Doc) as Doc; } @computed get originalLayout() { return this.props.Document.expandedTemplate as Doc; } @computed get targetDoc() { return this.originalLayout?.presentationTargetDoc as Doc; } - @computed get currentIndex() { return NumCast(this.presentationDoc?.selectedDoc); } + @computed get currentIndex() { return NumCast(this.presentationDoc?._itemIndex); } componentDidMount() { this._heightDisposer = reaction(() => [this.originalLayout.embedOpen, this.originalLayout.collapsedHeight], |