aboutsummaryrefslogtreecommitdiff
path: root/src/fields/Doc.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-02-26 14:45:02 -0500
committerbobzel <zzzman@gmail.com>2024-02-26 14:45:02 -0500
commitab658feb8d5a0a2c7eb2bd213bff227b7accb23a (patch)
tree5376678ab8d2b4cc63c7aad954816e40f0d32667 /src/fields/Doc.ts
parentd99f64efe9e69f2159f1ad8f851b24533a996ba5 (diff)
fixed tooltips to not grab events - this made moving down a menu a problem since the tooltip blocked the next menu item and wouldn't give the hover event to the next menu item. fixed proto_embeddings to update when lassoing a collection in marqueeView which made showContexts in property view do the right thing.
Diffstat (limited to 'src/fields/Doc.ts')
-rw-r--r--src/fields/Doc.ts11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts
index 56d50846a..b1bdd50a7 100644
--- a/src/fields/Doc.ts
+++ b/src/fields/Doc.ts
@@ -391,7 +391,10 @@ export class Doc extends RefField {
export namespace Doc {
export function SetContainer(doc: Doc, container: Doc) {
- container !== Doc.MyRecentlyClosed && (doc.embedContainer = container);
+ if (container !== Doc.MyRecentlyClosed) {
+ doc.embedContainer = container;
+ Doc.AddEmbedding(doc, doc);
+ }
}
export function RunCachedUpdate(doc: Doc, field: string) {
const update = doc[CachedUpdates][field];
@@ -604,7 +607,7 @@ export namespace Doc {
const dataDoc = doc[DocData];
const availableEmbeddings = Doc.GetEmbeddings(dataDoc);
const bestEmbedding = [...(dataDoc !== doc ? [doc] : []), ...availableEmbeddings].find(doc => !doc.embedContainer && doc.author === Doc.CurrentUserEmail);
- bestEmbedding && Doc.AddDocToList(dataDoc, 'protoEmbeddings', doc, undefined, undefined, undefined, undefined, undefined, true);
+ bestEmbedding && Doc.AddDocToList(dataDoc, 'proto_embeddings', doc, undefined, undefined, undefined, undefined, undefined, true);
return bestEmbedding ?? Doc.MakeEmbedding(doc);
}
@@ -984,10 +987,9 @@ export namespace Doc {
Object.keys(doc)
.filter(key => key.startsWith('acl'))
.forEach(key => (delegate[key] = doc[key]));
- if (!Doc.IsSystem(doc)) Doc.AddEmbedding(doc, delegate);
title && (delegate.title = title);
delegate[Initializing] = false;
- Doc.AddEmbedding(doc, delegate);
+ if (!Doc.IsSystem(doc)) Doc.AddEmbedding(doc, delegate);
return delegate;
}
return undefined;
@@ -1008,7 +1010,6 @@ export namespace Doc {
delegate[Initializing] = true;
delegate.proto = delegateProto;
delegate.author = Doc.CurrentUserEmail;
- Doc.AddEmbedding(delegateProto, delegate);
delegate[Initializing] = false;
delegateProto[Initializing] = false;
return delegate;