diff options
author | monoguitari <113245090+monoguitari@users.noreply.github.com> | 2023-08-28 13:07:16 -0400 |
---|---|---|
committer | monoguitari <113245090+monoguitari@users.noreply.github.com> | 2023-08-28 13:07:16 -0400 |
commit | 06363e4bfa55d10075f72d39221c6ba7b92f9f6c (patch) | |
tree | 2b8d57298665f931369c53f842a74ab995f04c77 /src/client/views/nodes/trails/PresBox.tsx | |
parent | 5276e521260ffe8b450a63aba20273f8e628e7fc (diff) |
Fixed reload bug
Diffstat (limited to 'src/client/views/nodes/trails/PresBox.tsx')
-rw-r--r-- | src/client/views/nodes/trails/PresBox.tsx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx index dd91660ec..00c12d3d8 100644 --- a/src/client/views/nodes/trails/PresBox.tsx +++ b/src/client/views/nodes/trails/PresBox.tsx @@ -286,6 +286,10 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { // go to documents chain runSubroutines = (childrenToRun: Doc[], normallyNextSlide: Doc) => { console.log(childrenToRun, normallyNextSlide, 'runSUBFUNC'); + if (childrenToRun === undefined) { + console.log('children undefined'); + return; + } if (childrenToRun[0] === normallyNextSlide) { return; } @@ -339,7 +343,8 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { // before moving onto next slide, run the subroutines :) const currentDoc = this.childDocs[this.itemIndex]; - this.runSubroutines(TreeView.GetRunningChildren.get(currentDoc)?.(), this.childDocs[this.itemIndex + 1]); + //could i do this.childDocs[this.itemIndex] for first arg? + this.runSubroutines(TreeView.GetRunningChildren.get(currentDoc)?.() , this.childDocs[this.itemIndex + 1]); this.nextSlide(curLast + 1 === this.childDocs.length ? (this.layoutDoc.presLoop ? 0 : curLast) : curLast + 1); progressiveReveal(true); // shows first progressive document, but without a transition effect @@ -723,7 +728,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { navigateToActiveItem = (afterNav?: () => void) => { const activeItem: Doc = this.activeItem; const targetDoc: Doc = this.targetDoc; - BranchingTrailManager.Instance.observeDocumentChange(targetDoc, this); + // BranchingTrailManager.Instance.observeDocumentChange(targetDoc, this); const finished = () => { afterNav?.(); console.log('Finish Slide Nav: ' + targetDoc.title); @@ -1113,7 +1118,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() { //Regular click @action selectElement = (doc: Doc, noNav = false) => { - BranchingTrailManager.Instance.observeDocumentChange(doc, this); + // BranchingTrailManager.Instance.observeDocumentChange(doc, this); CollectionStackedTimeline.CurrentlyPlaying?.map((clip, i) => clip?.ComponentView?.Pause?.()); if (noNav) { const index = this.childDocs.indexOf(doc); |