* UI enhancements for #3176 - Large overlay now displays fullscreen; * UI enhancements for #3176 - Adding new ".is-in-small-container" CSS - VERY WIP! - TODO: fix table implementation; * UI fixes for NIRVSS client #170 - Hide table header filter inputs when table is in small container; * UI fixes for NIRVSS client #170 - Fixing legends and plot layout when small, and within a stacked plot; - Add new `hideLegendWhenSmall` property; - Remove 'hidden' from plot legend position options; - Reduced opacity of tabular headers in Espresso theme; - VERY, VERY WIP right now! * UI fixes for NIRVSS client #170 - Fixing legends and plot layout when small, and within a stacked plot; - Cleanups, indention, removed commented CSS; - Tightened up spacing in plot Y axis; * UI enhancements for #3176 - Move local controls for plots and imagery, prevent overlapping with view large button when in a hidden frame in a layout; - Finesse local control styling for increased legibility; - Move l-state-indicators to avoid overlap with repositioned local controls, finesse styling; * UI enhancements for #3176 - Tweak large overlay close button for better visual alignment; * UI enhancements for #3176 - Significant improvements to lines in Display Layouts; - Increased border-width for lines and boxes; - Code enhanced for proper handling of horizontal and vertical lines - but still isn't working properly; - Renamed box-view.scss to box-and-line-views.scss; - VERY WIP! * Fixed incorrect grid array reference * UI enhancements for #3176 - Fixed final issue with Display Layout line drawing object, thank you @deeptailor!; * UI enhancements for #3176 - Contrast enhancements and markup normalization for `c-object-label` elements in main view, Layout frames, Inspector and overlay; - Enhanced `l-overlay-large` layout; - Tightened up margins and spacing in plots; - Refined `is-paused` styling in Telemetry Tables; - Now hide Telemetry Tables 'Export Data' button if rows are selected, which use a separate export button; - Layout frames now hide button's text labels when small; - Layout frames spacing tightened up and improved; * UI enhancements for #3176 - Tweak Snow theme constants; * UI enhancements for #3176 - Fixed ObjectFrame getOverlayElement method, added a wrapper div around the viewed object to properly control resulting layout in the overlay; - Simplified preview CSS to remove background, border and padding; - Layout tweaks to add space between scrollbar and thumbs in Imagery view; - Removed dev "-info" element in LineView.vue; * UI enhancements for #3176 - Improved styling for 'edit lock' button; * UI enhancements for #3176 - Show Display Layout frame "-move" bar on hover, rather than select, to make it easier to select items with hidden frames, and only show -move bar's drag grippy when that frame is selected; - `pointer-events: none` applied to table's body and plot's plot areas when placed in a Layout and being edited, prevents distracting interactions (plot zoom/pan, table row selection) when selecting and moving elements in a Layout; - Refined hover styles for c-button to use $filterHov, simplified and normalized hover styling; - Converted a number of old `<a>` tags to `<buttons>` to normalize styling and use the appropriate control; - Edit lock button is now colored when locked; * Fix linting issue * Minor tweaks - Tweaked control positioning; Co-authored-by: Shefali Joshi <simplyrender@gmail.com>
179 lines
5.6 KiB
Vue
179 lines
5.6 KiB
Vue
/*****************************************************************************
|
|
* Open MCT, Copyright (c) 2014-2018, United States Government
|
|
* as represented by the Administrator of the National Aeronautics and Space
|
|
* Administration. All rights reserved.
|
|
*
|
|
* Open MCT is licensed under the Apache License, Version 2.0 (the
|
|
* "License"); you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
* http://www.apache.org/licenses/LICENSE-2.0.
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
* License for the specific language governing permissions and limitations
|
|
* under the License.
|
|
*
|
|
* Open MCT includes source code licensed under additional open source
|
|
* licenses. See the Open Source Licenses file (LICENSES.md) included with
|
|
* this source code distribution or the Licensing information page available
|
|
* at runtime from the About dialog for additional information.
|
|
*****************************************************************************/
|
|
<template>
|
|
<div
|
|
class="c-so-view has-local-controls"
|
|
:class="{
|
|
'c-so-view--no-frame': !hasFrame,
|
|
'has-complex-content': complexContent,
|
|
'is-missing': domainObject.status === 'missing'
|
|
}"
|
|
>
|
|
<div class="c-so-view__header">
|
|
<div class="c-object-label"
|
|
:class="{
|
|
classList,
|
|
'is-missing': domainObject.status === 'missing'
|
|
}"
|
|
>
|
|
<div class="c-object-label__type-icon"
|
|
:class="cssClass"
|
|
>
|
|
<span class="is-missing__indicator"
|
|
title="This item is missing"
|
|
></span>
|
|
</div>
|
|
<div class="c-object-label__name">
|
|
{{ domainObject && domainObject.name }}
|
|
</div>
|
|
</div>
|
|
<context-menu-drop-down
|
|
:object-path="objectPath"
|
|
/>
|
|
</div>
|
|
<div class="c-so-view__local-controls c-so-view__view-large h-local-controls c-local-controls--show-on-hover">
|
|
<button
|
|
class="c-button icon-expand"
|
|
title="View Large"
|
|
@click="expand"
|
|
></button>
|
|
</div>
|
|
<div class="is-missing__indicator"
|
|
title="This item is missing"
|
|
></div>
|
|
<object-view
|
|
ref="objectView"
|
|
class="c-so-view__object-view"
|
|
:object="domainObject"
|
|
:show-edit-view="showEditView"
|
|
:object-path="objectPath"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import ObjectView from './ObjectView.vue'
|
|
import ContextMenuDropDown from './contextMenuDropDown.vue';
|
|
import PreviewHeader from '@/ui/preview/preview-header.vue';
|
|
import Vue from 'vue';
|
|
|
|
const SIMPLE_CONTENT_TYPES = [
|
|
'clock',
|
|
'timer',
|
|
'summary-widget',
|
|
'hyperlink',
|
|
'conditionWidget'
|
|
];
|
|
|
|
export default {
|
|
inject: ['openmct'],
|
|
components: {
|
|
ObjectView,
|
|
ContextMenuDropDown
|
|
},
|
|
props: {
|
|
domainObject: {
|
|
type: Object,
|
|
required: true
|
|
},
|
|
objectPath: {
|
|
type: Array,
|
|
required: true
|
|
},
|
|
hasFrame: Boolean,
|
|
showEditView: {
|
|
type: Boolean,
|
|
default: true
|
|
}
|
|
},
|
|
data() {
|
|
let objectType = this.openmct.types.get(this.domainObject.type),
|
|
cssClass = objectType && objectType.definition ? objectType.definition.cssClass : 'icon-object-unknown',
|
|
complexContent = !SIMPLE_CONTENT_TYPES.includes(this.domainObject.type);
|
|
|
|
return {
|
|
cssClass,
|
|
complexContent
|
|
}
|
|
},
|
|
computed: {
|
|
classList() {
|
|
const classList = this.domainObject.classList;
|
|
if (!classList || !classList.length) {
|
|
return '';
|
|
}
|
|
|
|
return classList.join(' ');
|
|
}
|
|
},
|
|
methods: {
|
|
expand() {
|
|
let objectView = this.$refs.objectView,
|
|
parentElement = objectView.$el,
|
|
childElement = parentElement.children[0];
|
|
|
|
this.openmct.overlays.overlay({
|
|
element: this.getOverlayElement(childElement),
|
|
size: 'large',
|
|
onDestroy() {
|
|
parentElement.append(childElement);
|
|
}
|
|
});
|
|
},
|
|
getOverlayElement(childElement) {
|
|
const fragment = new DocumentFragment();
|
|
const header = this.getPreviewHeader();
|
|
const wrapper = document.createElement('div');
|
|
wrapper.classList.add('l-preview-window__object-view');
|
|
wrapper.append(childElement);
|
|
fragment.append(header);
|
|
fragment.append(wrapper);
|
|
|
|
return fragment;
|
|
},
|
|
getPreviewHeader() {
|
|
const domainObject = this.objectPath[0];
|
|
const preview = new Vue({
|
|
components: {
|
|
PreviewHeader
|
|
},
|
|
provide: {
|
|
openmct: this.openmct,
|
|
objectPath: this.objectPath
|
|
},
|
|
data() {
|
|
return {
|
|
domainObject
|
|
}
|
|
},
|
|
template: '<PreviewHeader :domainObject="domainObject" :hideViewSwitcher="true" :showNotebookMenuSwitcher="true"></PreviewHeader>'
|
|
});
|
|
|
|
return preview.$mount().$el;
|
|
},
|
|
getSelectionContext() {
|
|
return this.$refs.objectView.getSelectionContext();
|
|
}
|
|
}
|
|
}
|
|
</script>
|