diff --git a/src/api/overlays/components/OverlayComponent.vue b/src/api/overlays/components/OverlayComponent.vue
index f06e1afcfd..f8a66f7597 100644
--- a/src/api/overlays/components/OverlayComponent.vue
+++ b/src/api/overlays/components/OverlayComponent.vue
@@ -12,7 +12,7 @@
>
{
- return this.snapshot(NOTEBOOK_DEFAULT);
+ return this.snapshot(NOTEBOOK_DEFAULT, event.target);
}
});
}
@@ -91,16 +91,17 @@ export default {
cssClass: 'icon-camera',
name: 'Save to Notebook Snapshots',
onItemClicked: () => {
- return this.snapshot(NOTEBOOK_SNAPSHOT);
+ return this.snapshot(NOTEBOOK_SNAPSHOT, event.target);
}
});
this.openmct.menus.showMenu(x, y, notebookTypes);
},
- snapshot(notebookType) {
+ snapshot(notebookType, target) {
this.$nextTick(() => {
- const element = document.querySelector('.c-overlay__contents')
- || document.getElementsByClassName('l-shell__main-container')[0];
+ const wrapper = target && target.closest('.js-notebook-snapshot-item-wrapper')
+ || document;
+ const element = wrapper.querySelector('.js-notebook-snapshot-item');
const bounds = this.openmct.time.bounds();
const link = !this.ignoreLink
diff --git a/src/ui/components/ObjectFrame.vue b/src/ui/components/ObjectFrame.vue
index c7fda1633a..fc4678d713 100644
--- a/src/ui/components/ObjectFrame.vue
+++ b/src/ui/components/ObjectFrame.vue
@@ -21,7 +21,7 @@
*****************************************************************************/
+
@@ -80,7 +85,7 @@
import ObjectView from './ObjectView.vue';
+import NotebookMenuSwitcher from '@/plugins/notebook/components/NotebookMenuSwitcher.vue';
const SIMPLE_CONTENT_TYPES = [
'clock',
@@ -103,7 +109,8 @@ const SIMPLE_CONTENT_TYPES = [
export default {
components: {
- ObjectView
+ ObjectView,
+ NotebookMenuSwitcher
},
inject: ['openmct'],
props: {
@@ -139,6 +146,7 @@ export default {
return {
cssClass,
complexContent,
+ notebookEnabled: this.openmct.types.get('notebook'),
statusBarItems: [],
status: ''
};
diff --git a/src/ui/layout/Layout.vue b/src/ui/layout/Layout.vue
index 5be8ce68fb..4f1255aaa7 100644
--- a/src/ui/layout/Layout.vue
+++ b/src/ui/layout/Layout.vue
@@ -90,7 +90,7 @@
/>
-