diff options
| author | bobzel <zzzman@gmail.com> | 2023-06-14 09:12:13 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-06-14 09:12:13 -0400 |
| commit | 376270791c7fe414c05a87f73afe11146d119c35 (patch) | |
| tree | c6c788c958a5aaca4a9bbdd709d5e6f1d76dde0d /src/client/views/PropertiesDocContextSelector.tsx | |
| parent | 2bc89733ce522527c2f27203b537d99395c9479b (diff) | |
| parent | bf16eca7a84adfdf1c5970e7e4793568ee70325d (diff) | |
Merge branch 'master' into advanced-trails
Diffstat (limited to 'src/client/views/PropertiesDocContextSelector.tsx')
| -rw-r--r-- | src/client/views/PropertiesDocContextSelector.tsx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/views/PropertiesDocContextSelector.tsx b/src/client/views/PropertiesDocContextSelector.tsx index c14d7ef73..e1279c9a7 100644 --- a/src/client/views/PropertiesDocContextSelector.tsx +++ b/src/client/views/PropertiesDocContextSelector.tsx @@ -23,14 +23,14 @@ export class PropertiesDocContextSelector extends React.Component<PropertiesDocC if (!this.props.DocView) return []; const target = this.props.DocView.props.Document; const targetContext = this.props.DocView.props.docViewPath().lastElement()?.rootDoc; - const aliases = DocListCast(target.aliases); - const containerProtos = aliases.filter(alias => alias.context && alias.context instanceof Doc).reduce((set, alias) => set.add(Cast(alias.context, Doc, null)), new Set<Doc>()); - const containerSets = Array.from(containerProtos.keys()).map(container => DocListCast(container.aliases)); + const embeddings = DocListCast(target.proto_embeddings); + const containerProtos = embeddings.filter(embedding => embedding.embedContainer && embedding.embedContainer instanceof Doc).reduce((set, embedding) => set.add(Cast(embedding.embedContainer, Doc, null)), new Set<Doc>()); + const containerSets = Array.from(containerProtos.keys()).map(container => DocListCast(container.proto_embeddings)); const containers = containerSets.reduce((p, set) => { set.map(s => p.add(s)); return p; }, new Set<Doc>()); - const doclayoutSets = Array.from(containers.keys()).map(dp => DocListCast(dp.aliases)); + const doclayoutSets = Array.from(containers.keys()).map(dp => DocListCast(dp.proto_embeddings)); const doclayouts = Array.from( doclayoutSets .reduce((p, set) => { @@ -48,7 +48,7 @@ export class PropertiesDocContextSelector extends React.Component<PropertiesDocC getOnClick = (col: Doc, target: Doc) => { if (!this.props.DocView) return; - col = Doc.IsPrototype(col) ? Doc.MakeDelegate(col) : col; + col = Doc.IsDataProto(col) ? Doc.MakeDelegate(col) : col; DocFocusOrOpen(Doc.GetProto(this.props.DocView.props.Document), undefined, col); }; |
