From 3843fcff9736b0b818c4670bbeb3444a97148cc5 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Wed, 21 Jun 2023 16:15:44 +0200 Subject: [PATCH] Click on reference props to go to them --- .../library/methods/updateReferenceNode.js | 5 +- app/imports/api/properties/References.js | 4 ++ .../ui/properties/shared/PropertyViewer.vue | 1 + .../ui/properties/viewers/ReferenceViewer.vue | 52 ++++++++++++++++--- 4 files changed, 54 insertions(+), 8 deletions(-) diff --git a/app/imports/api/library/methods/updateReferenceNode.js b/app/imports/api/library/methods/updateReferenceNode.js index 03d6d832..aa2a5407 100644 --- a/app/imports/api/library/methods/updateReferenceNode.js +++ b/app/imports/api/library/methods/updateReferenceNode.js @@ -58,7 +58,10 @@ function updateReferenceNodeWork(node, userId) { node: doc, }; if (library) { - cache.library = { name: library.name }; + cache.library = { + id: library._id, + name: library.name, + }; } writeCache(node._id, cache); } diff --git a/app/imports/api/properties/References.js b/app/imports/api/properties/References.js index 31ae8288..d6ece6e6 100644 --- a/app/imports/api/properties/References.js +++ b/app/imports/api/properties/References.js @@ -51,6 +51,10 @@ let ReferenceSchema = new SimpleSchema({ type: Object, optional: true, }, + 'cache.library.id': { + type: String, + optional: true, + }, 'cache.library.name': { type: String, optional: true, diff --git a/app/imports/client/ui/properties/shared/PropertyViewer.vue b/app/imports/client/ui/properties/shared/PropertyViewer.vue index add4c96c..de7777b0 100644 --- a/app/imports/client/ui/properties/shared/PropertyViewer.vue +++ b/app/imports/client/ui/properties/shared/PropertyViewer.vue @@ -52,6 +52,7 @@ :key="model._id" class="property-viewer" :model="model" + @select-sub-property="id => selectSubProperty(id)" /> @@ -26,15 +55,24 @@ -