diff options
| author | bobzel <zzzman@gmail.com> | 2021-03-12 20:16:05 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-03-12 20:16:05 -0500 |
| commit | 917aeb762ee5464156f2e2225388e2fe3882a124 (patch) | |
| tree | 1b35ffa3314563b663f32f3992c2bdf69a710d2c /src/client/views/collections/TreeView.tsx | |
| parent | 2a17392bd461bfdc669961c5bf8892b7cb6958d6 (diff) | |
fixed dropping documents onto file system view. fixed problem with tabDocView not removing itself from TabMap causing problem trying to open the same doc twice from the file system. made shouldNotScale a computed value.
Diffstat (limited to 'src/client/views/collections/TreeView.tsx')
| -rw-r--r-- | src/client/views/collections/TreeView.tsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/views/collections/TreeView.tsx b/src/client/views/collections/TreeView.tsx index 461289733..0d7ccc4bd 100644 --- a/src/client/views/collections/TreeView.tsx +++ b/src/client/views/collections/TreeView.tsx @@ -32,6 +32,9 @@ import { CollectionTreeView } from './CollectionTreeView'; import { CollectionView, CollectionViewType } from './CollectionView'; import "./TreeView.scss"; import React = require("react"); +import { ContextMenu } from '../ContextMenu'; +import { ContextMenuProps } from '../ContextMenuItem'; +import { SharingManager } from '../../util/SharingManager'; export interface TreeViewProps { document: Doc; @@ -268,7 +271,7 @@ export class TreeView extends React.Component<TreeViewProps> { (doc: Doc | Doc[]) => (doc instanceof Doc ? [doc] : doc).reduce((flg, doc) => flg && localAdd(doc), true as boolean); const move = (!docDragData.dropAction || docDragData.dropAction === "proto" || docDragData.dropAction === "move" || docDragData.dropAction === "same") && docDragData.moveDocument; if (canAdd) { - UndoManager.RunInTempBatch(() => docDragData.droppedDocuments.reduce((added, d) => (move ? move(d, undefined, addDoc) : addDoc(d)) || added, false)); + UndoManager.RunInTempBatch(() => docDragData.droppedDocuments.reduce((added, d) => (move ? move(d, undefined, addDoc) || (docDragData.dropAction === "proto" ? addDoc(d) : false) : addDoc(d)) || added, false)); } } } @@ -550,7 +553,7 @@ export class TreeView extends React.Component<TreeViewProps> { const view = this._editTitle ? <EditableView key="_editTitle" oneLine={true} display={"inline-block"} - editing={true} + editing={this._editTitle} background={"#7089bb"} contents={StrCast(this.doc.title)} height={12} |
