aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/trails/PresBox.tsx14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx
index 914d6ab15..a434ed24d 100644
--- a/src/client/views/nodes/trails/PresBox.tsx
+++ b/src/client/views/nodes/trails/PresBox.tsx
@@ -140,8 +140,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
{ field: "string", data: Doc.name, container: Doc.name });
}
this.props.Document.presentationFieldKey = this.fieldKey; // provide info to the presElement script so that it can look up rendering information about the presBox
- //TODO: [AL] change this
- this.props.Document.presentationLinearizedDocuments = new List<Doc>();
+
}
@computed get selectedDocumentView() {
if (SelectionManager.Views().length) return SelectionManager.Views()[0];
@@ -617,8 +616,8 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
this.rootDoc.y = pt[1] + 10;
this.rootDoc._height = 30;
this.rootDoc._width = 248;
- this.props.removeDocument?.(this.layoutDoc);
Doc.AddDocToList((Doc.UserDoc().myOverlayDocs as Doc), undefined, this.rootDoc);
+ this.props.removeDocument?.(this.layoutDoc);
}
}
@@ -745,10 +744,6 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
//Regular click
@action
selectElement = async (doc: Doc) => {
- console.log("tree docs are:", this._treeViewMap);
- console.log("child docs are:", this.childDocs);
- console.log("linearized docs:", this.rootDoc.presentationLinearizedDocuments);
- console.log("got here", this.childDocs.indexOf(doc));
const context = Cast(doc.context, Doc, null);
this.gotoDocument(this.childDocs.indexOf(doc), this.activeItem);
if (doc.presPinView || doc.presentationTargetDoc === this.layoutDoc.presCollection) setTimeout(() => this.updateCurrentPresentation(context), 0);
@@ -2465,7 +2460,10 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
}
console.log(String(index), treeViewDoc)
this._treeViewMap.delete(indexNum);
- this.props.Document.presentationLinearizedDocuments = new List<Doc>(this.sort(this._treeViewMap));
+ const overlay = (Doc.UserDoc().myOverlayDocs as Doc);
+ if (!DocListCast(overlay[Doc.LayoutFieldKey(overlay)]).includes(this.rootDoc)) {
+ this.props.Document.presentationLinearizedDocuments = new List<Doc>(this.sort(this._treeViewMap));
+ }
return this.childDocs;
}