Compare commits

..

6 Commits

6 changed files with 74 additions and 62 deletions

View File

@ -288,8 +288,6 @@ define([
this.install(this.plugins.ObjectInterceptors());
this.install(this.plugins.NonEditableFolder());
this.install(this.plugins.DeviceClassifier());
this._isVue = true;
}
MCT.prototype = Object.create(EventEmitter.prototype);

View File

@ -180,13 +180,9 @@ export default {
this.openmct.notifications.alert(message);
}
if (this.openmct.editor.isEditing()) {
this.previewEmbed();
} else {
const relativeHash = hash.slice(hash.indexOf('#'));
const url = new URL(relativeHash, `${location.protocol}//${location.host}${location.pathname}`);
this.openmct.router.navigate(url.hash);
}
const relativeHash = hash.slice(hash.indexOf('#'));
const url = new URL(relativeHash, `${location.protocol}//${location.host}${location.pathname}`);
this.openmct.router.navigate(url.hash);
},
formatTime(unixTime, timeFormat) {
return Moment.utc(unixTime).format(timeFormat);

View File

@ -21,57 +21,67 @@
-->
<template>
<div class="u-contents">
<div v-if="canEdit"
class="grid-row"
<ul v-if="canEdit"
class="l-inspector-part"
>
<div class="grid-cell label"
:title="editTitle"
>{{ shortLabel }}</div>
<div class="grid-cell value">
<div class="c-click-swatch c-click-swatch--menu"
@click="toggleSwatch()"
>
<span class="c-color-swatch"
:style="{ background: currentColor }"
<h2 v-if="heading"
:title="heading"
>{{ heading }}</h2>
<li class="grid-row">
<div class="grid-cell label"
:title="editTitle"
>{{ shortLabel }}</div>
<div class="grid-cell value">
<div class="c-click-swatch c-click-swatch--menu"
@click="toggleSwatch()"
>
</span>
</div>
<div class="c-palette c-palette--color">
<div v-show="swatchActive"
class="c-palette__items"
>
<div v-for="group in colorPaletteGroups"
:key="group.id"
class="u-contents"
<span class="c-color-swatch"
:style="{ background: currentColor }"
>
<div v-for="color in group"
:key="color.id"
class="c-palette__item"
:class="{ 'selected': currentColor === color.hexString }"
:style="{ background: color.hexString }"
@click="setColor(color)"
</span>
</div>
<div class="c-palette c-palette--color">
<div v-show="swatchActive"
class="c-palette__items"
>
<div v-for="group in colorPaletteGroups"
:key="group.id"
class="u-contents"
>
<div v-for="color in group"
:key="color.id"
class="c-palette__item"
:class="{ 'selected': currentColor === color.hexString }"
:style="{ background: color.hexString }"
@click="setColor(color)"
>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div v-else
class="grid-row"
</li>
</ul>
<ul v-else
class="l-inspector-part"
>
<div class="grid-cell label"
:title="viewTitle"
>{{ shortLabel }}</div>
<div class="grid-cell value">
<span class="c-color-swatch"
:style="{
'background': currentColor
}"
>
</span>
</div>
</div>
<h2 v-if="heading"
:title="heading"
>{{ heading }}</h2>
<li class="grid-row">
<div class="grid-cell label"
:title="viewTitle"
>{{ shortLabel }}</div>
<div class="grid-cell value">
<span class="c-color-swatch"
:style="{
'background': currentColor
}"
>
</span>
</div>
</li>
</ul>
</div>
</template>
@ -104,6 +114,12 @@ export default {
default() {
return 'Color';
}
},
heading: {
type: String,
default() {
return '';
}
}
},
data() {

View File

@ -107,7 +107,7 @@ export default {
};
this.openmct.objects.mutate(
this.domainObject,
`configuration.barStyles[${key}]`,
`configuration.barStyles[${this.key}]`,
this.domainObject.configuration.barStyles[key]
);
} else {

View File

@ -33,9 +33,9 @@
</li>
<ColorSwatch v-if="expanded"
:current-color="currentColor"
title="Manually set the color for this bar graph series."
edit-title="Manually set the color for this bar graph series"
view-title="The color for this bar graph series."
title="Manually set the color for this bar graph."
edit-title="Manually set the color for this bar graph"
view-title="The color for this bar graph."
short-label="Color"
class="grid-properties"
@colorSet="setColor"

View File

@ -20,13 +20,15 @@
at runtime from the About dialog for additional information.
-->
<template>
<ul class="c-tree">
<h2 title="Display properties for this object">Bar Graph Series</h2>
<bar-graph-options v-for="series in domainObject.composition"
:key="series.key"
:item="series"
/>
</ul>
<div>
<ul class="c-tree">
<li v-for="series in domainObject.composition"
:key="series.key"
>
<bar-graph-options :item="series" />
</li>
</ul>
</div>
</template>
<script>