aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/client/views/collections/CollectionTreeView.tsx8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/client/views/collections/CollectionTreeView.tsx b/src/client/views/collections/CollectionTreeView.tsx
index b27f75837..1aa3a9364 100644
--- a/src/client/views/collections/CollectionTreeView.tsx
+++ b/src/client/views/collections/CollectionTreeView.tsx
@@ -145,13 +145,11 @@ class TreeView extends React.Component<TreeViewProps> {
}
componentWillUnmount() {
- console.log("DISMOUT" + this.doc.title);
document.removeEventListener("pointermove", this.onDragMove, true);
document.removeEventListener("pointermove", this.onDragUp, true);
}
onDragUp = (e: PointerEvent) => {
- console.log("DUP" + this.doc.title);
document.removeEventListener("pointerup", this.onDragUp, true);
document.removeEventListener("pointermove", this.onDragMove, true);
}
@@ -163,7 +161,6 @@ class TreeView extends React.Component<TreeViewProps> {
document.addEventListener("pointermove", this.onDragMove, true);
document.removeEventListener("pointerup", this.onDragUp, true);
document.addEventListener("pointerup", this.onDragUp, true);
- console.log("DSTART" + this.doc.title);
}
}
onPointerLeave = (e: React.PointerEvent): void => {
@@ -171,7 +168,6 @@ class TreeView extends React.Component<TreeViewProps> {
if (this._header?.current?.className !== "treeViewItem-header-editing") {
this._header!.current!.className = "treeViewItem-header";
}
- console.log("DLEAVE" + this.doc.title);
document.removeEventListener("pointerup", this.onDragUp, true);
document.removeEventListener("pointermove", this.onDragMove, true);
}
@@ -189,7 +185,7 @@ class TreeView extends React.Component<TreeViewProps> {
}
public static makeTextBullet() {
- const bullet = Docs.Create.TextDocument("-text-", { title: "-title-", _viewType: CollectionViewType.Tree, treeViewHideHeader: true, hideLinkButton: true, _showSidebar: true, treeViewOutlineMode: true, x: 0, y: 0, _xMargin: 0, _yMargin: 0, _autoHeight: true, _singleLine: true, _backgroundColor: "transparent", _width: 1000, _height: 10, templates: new List<string>([Templates.Title.Layout]) });
+ const bullet = Docs.Create.TextDocument("-text-", { title: "-title-", _viewType: CollectionViewType.Tree, hideLinkButton: true, _showSidebar: true, treeViewOutlineMode: true, x: 0, y: 0, _xMargin: 0, _yMargin: 0, _autoHeight: true, _singleLine: true, _backgroundColor: "transparent", _width: 1000, _height: 10, templates: new List<string>([Templates.Title.Layout]) });
Doc.GetProto(bullet).layout = CollectionView.LayoutString("data");
Doc.GetProto(bullet).title = ComputedField.MakeFunction('self.text?.Text');
Doc.GetProto(bullet).data = new List<Doc>([]);
@@ -568,7 +564,7 @@ class TreeView extends React.Component<TreeViewProps> {
}
} else this._editMaxWidth = "";
const selected = SelectionManager.IsSelected(DocumentManager.Instance.getFirstDocumentView(this.doc));
- return this.doc.treeViewHideHeader ?
+ return this.doc.treeViewHideHeader || this.outlineMode ?
!StrCast(Doc.LayoutField(this.doc)).includes("CollectionView") ? this.renderContent :
<div className={`treeViewItem-container${selected ? "-active" : ""}`} ref={this.createTreeDropTarget} onPointerDown={e => this.props.active(true) && SelectionManager.DeselectAll()}
onKeyDown={e => {