diff options
| author | bobzel <zzzman@gmail.com> | 2024-01-24 17:10:48 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2024-01-24 17:10:48 -0500 |
| commit | 1680758323f87d15072f485c0156e6b079aad173 (patch) | |
| tree | 219571c547b86531cde151e0258977fc3887938b /src/client/views/collections/TreeView.tsx | |
| parent | c8be94244bcd094efba739e5a46034bceccea80f (diff) | |
added dragConfig() to allow components to set custom docDragData fields. got rid of treeViewDoc prop
Diffstat (limited to 'src/client/views/collections/TreeView.tsx')
| -rw-r--r-- | src/client/views/collections/TreeView.tsx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/client/views/collections/TreeView.tsx b/src/client/views/collections/TreeView.tsx index 40933321f..be5737a25 100644 --- a/src/client/views/collections/TreeView.tsx +++ b/src/client/views/collections/TreeView.tsx @@ -446,7 +446,7 @@ export class TreeView extends ObservableReactComponent<TreeViewProps> { return (doc instanceof Doc ? [doc] : doc).reduce((flg, doc) => flg && innerAdd(doc), true as boolean); }; const addDoc = inside ? localAdd : parentAddDoc; - const canAdd = (!this.treeView.outlineMode && !StrCast((inside ? this.Document : this._props.treeViewParent)?.treeView_FreezeChildren).includes('add')) || forceAdd; + const canAdd = !StrCast((inside ? this.Document : this._props.treeViewParent)?.treeView_FreezeChildren).includes('add') || forceAdd; if (canAdd && (dropAction !== 'inSame' || droppedDocuments.every(d => d.embedContainer === this._props.parentTreeView?.Document))) { const move = (!dropAction || canEmbed || dropAction === 'proto' || dropAction === 'move' || dropAction === 'same' || dropAction === 'inSame') && moveDocument; this._props.parentTreeView instanceof TreeView && (this._props.parentTreeView.dropping = true); @@ -987,7 +987,6 @@ export class TreeView extends ObservableReactComponent<TreeViewProps> { styleProvider={this.titleStyleProvider} onClickScriptDisable="never" // tree docViews have a script to show fields, etc. containerViewPath={this.treeView.childContainerViewPath} - treeViewDoc={this.treeView.Document} addDocument={undefined} addDocTab={this._props.addDocTab} pinToPres={this.treeView._props.pinToPres} @@ -1102,7 +1101,6 @@ export class TreeView extends ObservableReactComponent<TreeViewProps> { renderDepth={this._props.renderDepth + 1} onClickScript={this.onChildClick} onKey={this.onKeyDown} - treeViewDoc={this.treeView?.Document} containerViewPath={this.treeView.childContainerViewPath} childFilters={returnEmptyFilter} childFiltersByRanges={returnEmptyFilter} |
