aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-01-15 15:27:16 -0500
committerbobzel <zzzman@gmail.com>2021-01-15 15:27:16 -0500
commitba3bcbbf3f0ce8769acb6e84ac3aa8ac3a5c9694 (patch)
tree6fe66f348d6cbab554bcace9a4c93f1558e263b2 /src/client/views/collections
parent4eb2de2c53280104fc809bbd387ed97460312e69 (diff)
fixed more issues with audio Box - simplified decorations when selected. fixed dragging when not selected. added esc to stop dragging.
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/TreeView.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/client/views/collections/TreeView.tsx b/src/client/views/collections/TreeView.tsx
index a61a9e43c..c4934cf45 100644
--- a/src/client/views/collections/TreeView.tsx
+++ b/src/client/views/collections/TreeView.tsx
@@ -379,7 +379,8 @@ export class TreeView extends React.Component<TreeViewProps> {
TraceMobx();
const expandKey = this.treeViewExpandedView;
if (["links", "annotations", this.fieldKey].includes(expandKey)) {
- const remDoc = (doc: Doc | Doc[]) => this.remove(doc, expandKey);
+ const key = expandKey === "annotations" ? this.fieldKey + "-annotations" : expandKey;
+ const remDoc = (doc: Doc | Doc[]) => this.remove(doc, key);
const localAdd = (doc: Doc, addBefore?: Doc, before?: boolean) => {
// if there's a sort ordering specified that can be modified on drop (eg, zorder can be modified, alphabetical can't),
// then the modification would be done here
@@ -391,7 +392,7 @@ export class TreeView extends React.Component<TreeViewProps> {
docs.sort((a, b) => NumCast(a.zIndex) > NumCast(b.zIndex) ? 1 : -1);
docs.forEach((d, i) => d.zIndex = i);
}
- const added = Doc.AddDocToList(this.dataDoc, expandKey, doc, addBefore, before, false, true);
+ const added = Doc.AddDocToList(this.dataDoc, key, doc, addBefore, before, false, true);
added && (doc.context = this.doc.context);
return added;
};