+
{this.slideHistoryStack.map((info, index) => {
const [presId, targetDocId] = info.split(',');
const doc = this.docIdToDocMap.get(targetDocId);
diff --git a/src/client/util/CurrentUserUtils.ts b/src/client/util/CurrentUserUtils.ts
index 99a8ee571..0c2b235cb 100644
--- a/src/client/util/CurrentUserUtils.ts
+++ b/src/client/util/CurrentUserUtils.ts
@@ -609,6 +609,7 @@ export class CurrentUserUtils {
{ scripts: { }, opts: { title: "undoStack", layout: "", toolTip: "Undo/Redo Stack"}}, // note: layout fields are hacks -- they don't actually run through the JSX parser (yet)
{ scripts: { }, opts: { title: "linker", layout: "", toolTip: "link started"}},
{ scripts: { }, opts: { title: "currently playing", layout: "", toolTip: "currently playing media"}},
+ { scripts: { }, opts: { title: "Branching", layout: "", toolTip: "Branch, baby!"}}
];
const btns = btnDescs.map(desc => dockBtn({_width: 30, _height: 30, defaultDoubleClick: 'ignore', undoIgnoreFields: new List(['opacity']), _dragOnlyWithinContainer: true, ...desc.opts}, desc.scripts));
const dockBtnsReqdOpts:DocumentOptions = {
diff --git a/src/client/views/Main.tsx b/src/client/views/Main.tsx
index 730a926a2..8f0c00cc3 100644
--- a/src/client/views/Main.tsx
+++ b/src/client/views/Main.tsx
@@ -51,7 +51,7 @@ FieldLoader.ServerLoadStatus = { requested: 0, retrieved: 0, message: 'cache' };
document.cookie = `loadtime=${loading};${expires};path=/`;
new TrackMovements();
new ReplayMovements();
- new BranchingTrailManager();
+ new BranchingTrailManager({});
new PingManager();
root.render();
}, 0);
diff --git a/src/client/views/OverlayView.tsx b/src/client/views/OverlayView.tsx
index 339507f65..e838473d2 100644
--- a/src/client/views/OverlayView.tsx
+++ b/src/client/views/OverlayView.tsx
@@ -146,6 +146,7 @@ export class OverlayView extends React.Component {
@action
addWindow(contents: JSX.Element, options: OverlayElementOptions): OverlayDisposer {
+ console.log("adding window");
const remove = action(() => {
const index = this._elements.indexOf(contents);
if (index !== -1) this._elements.splice(index, 1);
diff --git a/src/client/views/collections/collectionLinear/CollectionLinearView.tsx b/src/client/views/collections/collectionLinear/CollectionLinearView.tsx
index 2254b2e5f..707986ec3 100644
--- a/src/client/views/collections/collectionLinear/CollectionLinearView.tsx
+++ b/src/client/views/collections/collectionLinear/CollectionLinearView.tsx
@@ -22,6 +22,7 @@ import { CollectionSubView } from '../CollectionSubView';
import './CollectionLinearView.scss';
import { Button, Toggle, ToggleType, Type } from 'browndash-components';
import { Colors } from '../../global/globalEnums';
+import { BranchingTrailManager } from '../../../util/BranchingTrailManager';
/**
* CollectionLinearView is the class for rendering the horizontal collection
@@ -145,6 +146,7 @@ export class CollectionLinearView extends CollectionSubView() {
case '': return this.getLinkUI();
case '': return this.getCurrentlyPlayingUI();
case '': return ;
+ case '': return Doc.UserDoc().isBranchingMode ? : null;
}
const nested = doc._type_collection === CollectionViewType.Linear;
diff --git a/src/client/views/nodes/RecordingBox/RecordingBox.tsx b/src/client/views/nodes/RecordingBox/RecordingBox.tsx
index d6e4bd304..fdb00c552 100644
--- a/src/client/views/nodes/RecordingBox/RecordingBox.tsx
+++ b/src/client/views/nodes/RecordingBox/RecordingBox.tsx
@@ -155,7 +155,7 @@ ScriptingGlobals.add(function toggleRecPlayback(value: Doc) {
Doc.UserDoc().currentRecording = docView.ComponentView as VideoBox;
// docval.Play();
})} else {
- let recordingIndex = Array.from(Doc.UserDoc().workspaceRecordings).indexOf(value);
+ let recordingIndex = Array.from(Doc.UserDoc().workspaceRecordings).indexOf(Doc);
DragManager.StartDropdownDrag([document.createElement('div')],new DragManager.DocumentDragData([value]), 1, 1, recordingIndex);
}
diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx
index b02e7ecbd..ee85287ed 100644
--- a/src/client/views/nodes/trails/PresBox.tsx
+++ b/src/client/views/nodes/trails/PresBox.tsx
@@ -38,6 +38,7 @@ import './PresBox.scss';
import { PresEffect, PresEffectDirection, PresMovement, PresStatus } from './PresEnums';
import { BranchingTrailManager } from '../../../util/BranchingTrailManager';
import { TreeView } from '../../collections/TreeView';
+import { OverlayView } from '../../OverlayView';
const { Howl } = require('howler');
export interface pinDataTypes {
@@ -378,6 +379,7 @@ export class PresBox extends ViewBoxBaseComponent() {
//it'll also execute the necessary actions if presentation is playing.
@undoBatch
public gotoDocument = action((index: number, from?: Doc, group?: boolean, finished?: () => void) => {
+ console.log("going to document");
Doc.UnBrushAllDocs();
if (index >= 0 && index < this.childDocs.length) {
this.rootDoc._itemIndex = index;
@@ -1101,13 +1103,18 @@ export class PresBox extends ViewBoxBaseComponent() {
//Regular click
@action
selectElement = (doc: Doc, noNav = false) => {
+ BranchingTrailManager.Instance.observeDocumentChange(doc, this);
CollectionStackedTimeline.CurrentlyPlaying?.map((clip, i) => clip?.ComponentView?.Pause?.());
if (noNav) {
const index = this.childDocs.indexOf(doc);
if (index >= 0 && index < this.childDocs.length) {
this.rootDoc._itemIndex = index;
}
- } else this.gotoDocument(this.childDocs.indexOf(doc), this.activeItem);
+ console.log("no nav")
+ } else {
+ this.gotoDocument(this.childDocs.indexOf(doc), this.activeItem);
+ console.log('e bitch')
+ }
this.updateCurrentPresentation(DocCast(doc.embedContainer));
};
diff --git a/src/client/views/nodes/trails/PresElementBox.tsx b/src/client/views/nodes/trails/PresElementBox.tsx
index 6bc1e95ac..711c9cab9 100644
--- a/src/client/views/nodes/trails/PresElementBox.tsx
+++ b/src/client/views/nodes/trails/PresElementBox.tsx
@@ -26,6 +26,7 @@ import './PresElementBox.scss';
import { PresMovement } from './PresEnums';
import React = require('react');
import { TreeView } from '../../collections/TreeView';
+import { BranchingTrailManager } from '../../../util/BranchingTrailManager';
/**
* This class models the view a document added to presentation will have in the presentation.
* It involves some functionality for its buttons and options.
@@ -431,6 +432,7 @@ export class PresElementBox extends ViewBoxBaseComponent() {
const hasChildren: boolean = Cast(this.rootDoc?.hasChildren, 'boolean') || false;
const items: JSX.Element[] = [];
+
items.push(
Update captured doc layout
}>