diff options
| author | Sophie Zhang <sophie_zhang@brown.edu> | 2024-05-14 14:53:11 -0400 |
|---|---|---|
| committer | Sophie Zhang <sophie_zhang@brown.edu> | 2024-05-14 14:53:11 -0400 |
| commit | 8838ae5c70a50e2efd0c0d02617988403720e5d4 (patch) | |
| tree | b605cb5c7a7d06f1b96f0fac887947476a1a0ae7 /src/client/views/nodes/trails/PresBox.tsx | |
| parent | ca3f52a9a973f856a8fb667170d0c0dd423b5e4f (diff) | |
| parent | 2caf7b7bb80b663b6ba585f88cdbd2d725f8505e (diff) | |
Merge branch 'master' into sophie-pres-transitions
Diffstat (limited to 'src/client/views/nodes/trails/PresBox.tsx')
| -rw-r--r-- | src/client/views/nodes/trails/PresBox.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index 632636c85..cbbba1690 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -544,8 +544,9 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { // Case 2: Last slide and presLoop is toggled ON or it is in Edit mode this.nextSlide(0); progressiveReveal(true); // shows first progressive document, but without a transition effect + return 0; } - return 0; + return false; } return this.itemIndex; }; @@ -1186,7 +1187,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { const func = () => { const delay = NumCast(this.activeItem.presentation_duration, this.activeItem.type === DocumentType.SCRIPTING ? 0 : 2500) + NumCast(this.activeItem.presentation_transition); this._presTimer = setTimeout(() => { - if (!this.next()) this.layoutDoc.presentation_status = this._exitTrail?.() ?? PresStatus.Manual; + if (this.next() === false) this.layoutDoc.presentation_status = this._exitTrail?.() ?? PresStatus.Manual; this.layoutDoc.presentation_status === PresStatus.Autoplay && func(); }, delay); }; @@ -1288,7 +1289,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { } } else if (doc.type !== DocumentType.PRES) { if (!doc.presentation_targetDoc) doc.title = doc.title + ' - Slide'; - doc.presentation_targetDoc = doc.createdFrom; // dropped document will be a new embedding of an embedded document somewhere else. + doc.presentation_targetDoc = doc.createdFrom ?? doc; // dropped document will be a new embedding of an embedded document somewhere else. doc.presentation_movement = PresMovement.Zoom; if (this._expandBoolean) doc.presentation_expandInlineButton = true; } |
