From c157fab081fcb4a95343b9b76656d2ee31bb1a70 Mon Sep 17 00:00:00 2001 From: Nikhil Date: Thu, 30 Apr 2020 16:39:20 -0700 Subject: [PATCH] [Notebook] Save snapshot dropdown should be available from "view large" overlay #2922 (#2926) * [Notebook] Save snapshot dropdown should be available from "view large" overlay #2922\ * Significant improvements to Snapshot styling * [Notebook] Embed links aren't navigating #2979 Co-authored-by: charlesh88 Co-authored-by: Andrew Henry --- .../components/notebook-menu-switcher.vue | 42 +++++++-- .../plot/res/templates/stacked-plot.html | 2 +- .../plot/src/services/ExportImageService.js | 3 +- .../telemetryTable/components/table.scss | 15 ++- src/styles/_controls.scss | 14 +++ src/styles/_legacy-plots.scss | 77 +++++++++++----- src/styles/_legacy.scss | 47 ---------- src/styles/notebook.scss | 14 +++ src/ui/components/ObjectFrame.vue | 32 ++++++- src/ui/components/object-frame.scss | 5 +- src/ui/layout/BrowseBar.vue | 1 + src/ui/preview/Preview.vue | 38 ++------ src/ui/preview/preview-header.vue | 92 +++++++++++++++++++ 13 files changed, 265 insertions(+), 117 deletions(-) create mode 100644 src/ui/preview/preview-header.vue diff --git a/src/plugins/notebook/components/notebook-menu-switcher.vue b/src/plugins/notebook/components/notebook-menu-switcher.vue index ed1b04bfae..88f43be8f1 100644 --- a/src/plugins/notebook/components/notebook-menu-switcher.vue +++ b/src/plugins/notebook/components/notebook-menu-switcher.vue @@ -40,6 +40,18 @@ export default { default() { return {}; } + }, + ignoreLink: { + type: Boolean, + default() { + return false; + } + }, + objectPath: { + type: Array, + default() { + return null; + } } }, data() { @@ -97,17 +109,27 @@ export default { this.showMenu = false; }, snapshot(notebook) { - let element = document.getElementsByClassName("l-shell__main-container")[0]; - const bounds = this.openmct.time.bounds(); - const objectPath = this.openmct.router.path; - const snapshotMeta = { - bounds, - link: window.location.href, - objectPath, - openmct: this.openmct - }; + this.hideMenu(); - this.notebookSnapshot.capture(snapshotMeta, notebook.type, element); + this.$nextTick(() => { + const element = document.querySelector('.c-overlay__contents') + || document.getElementsByClassName('l-shell__main-container')[0]; + + const bounds = this.openmct.time.bounds(); + const link = !this.ignoreLink + ? window.location.href + : null; + + const objectPath = this.objectPath || this.openmct.router.path; + const snapshotMeta = { + bounds, + link, + objectPath, + openmct: this.openmct + }; + + this.notebookSnapshot.capture(snapshotMeta, notebook.type, element); + }); } } } diff --git a/src/plugins/plot/res/templates/stacked-plot.html b/src/plugins/plot/res/templates/stacked-plot.html index 2ec6e0b491..6e69859339 100644 --- a/src/plugins/plot/res/templates/stacked-plot.html +++ b/src/plugins/plot/res/templates/stacked-plot.html @@ -21,7 +21,7 @@ -->
-
+