Compare commits
19 Commits
tables-rem
...
misc-ui-4b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ae678cbea | ||
|
|
488a5a77d5 | ||
|
|
88d7da63fa | ||
|
|
4656237b44 | ||
|
|
b9b65ec0b8 | ||
|
|
8965ba4ed3 | ||
|
|
063e4b3e62 | ||
|
|
f541a79676 | ||
|
|
9e811e722f | ||
|
|
155929c97f | ||
|
|
53f773812d | ||
|
|
8ef53d85c4 | ||
|
|
abcc5cb023 | ||
|
|
931871ff95 | ||
|
|
6b1e8862ef | ||
|
|
00ce246fc5 | ||
|
|
c0c7d96429 | ||
|
|
92b2582d0d | ||
|
|
4084a1ac86 |
@@ -43,6 +43,7 @@ define([
|
|||||||
'./ui/layout/Layout.vue',
|
'./ui/layout/Layout.vue',
|
||||||
'../platform/core/src/objects/DomainObjectImpl',
|
'../platform/core/src/objects/DomainObjectImpl',
|
||||||
'../platform/core/src/capabilities/ContextualDomainObject',
|
'../platform/core/src/capabilities/ContextualDomainObject',
|
||||||
|
'./ui/preview/plugin',
|
||||||
'vue'
|
'vue'
|
||||||
], function (
|
], function (
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
@@ -67,6 +68,7 @@ define([
|
|||||||
Layout,
|
Layout,
|
||||||
DomainObjectImpl,
|
DomainObjectImpl,
|
||||||
ContextualDomainObject,
|
ContextualDomainObject,
|
||||||
|
PreviewPlugin,
|
||||||
Vue
|
Vue
|
||||||
) {
|
) {
|
||||||
/**
|
/**
|
||||||
@@ -230,7 +232,7 @@ define([
|
|||||||
this.install(this.plugins.Plot());
|
this.install(this.plugins.Plot());
|
||||||
this.install(this.plugins.TelemetryTable());
|
this.install(this.plugins.TelemetryTable());
|
||||||
this.install(this.plugins.DisplayLayout());
|
this.install(this.plugins.DisplayLayout());
|
||||||
this.install(this.plugins.Preview());
|
this.install(PreviewPlugin.default());
|
||||||
|
|
||||||
if (typeof BUILD_CONSTANTS !== 'undefined') {
|
if (typeof BUILD_CONSTANTS !== 'undefined') {
|
||||||
this.install(buildInfoPlugin(BUILD_CONSTANTS));
|
this.install(buildInfoPlugin(BUILD_CONSTANTS));
|
||||||
|
|||||||
@@ -58,11 +58,8 @@ define([
|
|||||||
|
|
||||||
handleLegacyMutation = function (legacyObject) {
|
handleLegacyMutation = function (legacyObject) {
|
||||||
var newStyleObject = utils.toNewFormat(legacyObject.getModel(), legacyObject.getId());
|
var newStyleObject = utils.toNewFormat(legacyObject.getModel(), legacyObject.getId());
|
||||||
|
|
||||||
//Don't trigger self
|
|
||||||
this.eventEmitter.off('mutation', handleMutation);
|
|
||||||
this.eventEmitter.emit(newStyleObject.identifier.key + ":*", newStyleObject);
|
this.eventEmitter.emit(newStyleObject.identifier.key + ":*", newStyleObject);
|
||||||
this.eventEmitter.on('mutation', handleMutation);
|
this.eventEmitter.emit('mutation', newStyleObject);
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
||||||
this.eventEmitter.on('mutation', handleMutation);
|
this.eventEmitter.on('mutation', handleMutation);
|
||||||
|
|||||||
@@ -28,6 +28,11 @@ export default class Editor extends EventEmitter {
|
|||||||
super();
|
super();
|
||||||
this.editing = false;
|
this.editing = false;
|
||||||
this.openmct = openmct;
|
this.openmct = openmct;
|
||||||
|
document.addEventListener('drop', (event) => {
|
||||||
|
if (!this.isEditing()) {
|
||||||
|
this.edit();
|
||||||
|
}
|
||||||
|
}, {capture: true});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ define([
|
|||||||
function DefaultCompositionProvider(publicAPI, compositionAPI) {
|
function DefaultCompositionProvider(publicAPI, compositionAPI) {
|
||||||
this.publicAPI = publicAPI;
|
this.publicAPI = publicAPI;
|
||||||
this.listeningTo = {};
|
this.listeningTo = {};
|
||||||
|
this.onMutation = this.onMutation.bind(this);
|
||||||
|
|
||||||
this.cannotContainDuplicates = this.cannotContainDuplicates.bind(this);
|
this.cannotContainDuplicates = this.cannotContainDuplicates.bind(this);
|
||||||
this.cannotContainItself = this.cannotContainItself.bind(this);
|
this.cannotContainItself = this.cannotContainItself.bind(this);
|
||||||
@@ -208,9 +209,10 @@ define([
|
|||||||
if (this.topicListener) {
|
if (this.topicListener) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var topic = this.publicAPI.$injector.get('topic');
|
this.publicAPI.objects.eventEmitter.on('mutation', this.onMutation);
|
||||||
var mutation = topic('mutation');
|
this.topicListener = () => {
|
||||||
this.topicListener = mutation.listen(this.onMutation.bind(this));
|
this.publicAPI.objects.eventEmitter.off('mutation', this.onMutation)
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -220,7 +222,7 @@ define([
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
DefaultCompositionProvider.prototype.onMutation = function (oldDomainObject) {
|
DefaultCompositionProvider.prototype.onMutation = function (oldDomainObject) {
|
||||||
var id = oldDomainObject.getId();
|
var id = objectUtils.makeKeyString(oldDomainObject.identifier);
|
||||||
var listeners = this.listeningTo[id];
|
var listeners = this.listeningTo[id];
|
||||||
|
|
||||||
if (!listeners) {
|
if (!listeners) {
|
||||||
@@ -228,7 +230,7 @@ define([
|
|||||||
}
|
}
|
||||||
|
|
||||||
var oldComposition = listeners.composition.map(objectUtils.makeKeyString);
|
var oldComposition = listeners.composition.map(objectUtils.makeKeyString);
|
||||||
var newComposition = oldDomainObject.getModel().composition.map(objectUtils.makeKeyString);
|
var newComposition = oldDomainObject.composition.map(objectUtils.makeKeyString);
|
||||||
|
|
||||||
var added = _.difference(newComposition, oldComposition).map(objectUtils.parseKeyString);
|
var added = _.difference(newComposition, oldComposition).map(objectUtils.parseKeyString);
|
||||||
var removed = _.difference(oldComposition, newComposition).map(objectUtils.parseKeyString);
|
var removed = _.difference(oldComposition, newComposition).map(objectUtils.parseKeyString);
|
||||||
|
|||||||
@@ -83,18 +83,15 @@ define([
|
|||||||
this.object = newObject;
|
this.object = newObject;
|
||||||
}.bind(this);
|
}.bind(this);
|
||||||
|
|
||||||
this.eventEmitter.on(qualifiedEventName(this.object, '*'), handleRecursiveMutation);
|
//Emit wildcard event
|
||||||
|
|
||||||
//Emit event specific to property
|
|
||||||
this.eventEmitter.emit(qualifiedEventName(this.object, path), value);
|
|
||||||
|
|
||||||
this.eventEmitter.off(qualifiedEventName(this.object, '*'), handleRecursiveMutation);
|
|
||||||
|
|
||||||
//Emit wildcare event
|
|
||||||
this.eventEmitter.emit(qualifiedEventName(this.object, '*'), this.object);
|
this.eventEmitter.emit(qualifiedEventName(this.object, '*'), this.object);
|
||||||
|
|
||||||
//Emit a general "any object" event
|
//Emit a general "any object" event
|
||||||
this.eventEmitter.emit(ANY_OBJECT_EVENT, this.object);
|
this.eventEmitter.emit(ANY_OBJECT_EVENT, this.object);
|
||||||
|
|
||||||
|
this.eventEmitter.on(qualifiedEventName(this.object, '*'), handleRecursiveMutation);
|
||||||
|
//Emit event specific to property
|
||||||
|
this.eventEmitter.emit(qualifiedEventName(this.object, path), value);
|
||||||
|
this.eventEmitter.off(qualifiedEventName(this.object, '*'), handleRecursiveMutation);
|
||||||
};
|
};
|
||||||
|
|
||||||
return MutableObject;
|
return MutableObject;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ define([], function () {
|
|||||||
// is inside a layout, or the main layout is selected.
|
// is inside a layout, or the main layout is selected.
|
||||||
return (openmct.editor.isEditing() && selection &&
|
return (openmct.editor.isEditing() && selection &&
|
||||||
((selection[1] && selection[1].context.item && selection[1].context.item.type === 'layout') ||
|
((selection[1] && selection[1].context.item && selection[1].context.item.type === 'layout') ||
|
||||||
(selection[0].context.item && selection[0].context.item.type === 'layout')));
|
(selection[0].context.item && selection[0].context.item.type === 'layout')));
|
||||||
},
|
},
|
||||||
toolbar: function (selection) {
|
toolbar: function (selection) {
|
||||||
const DIALOG_FORM = {
|
const DIALOG_FORM = {
|
||||||
@@ -73,10 +73,13 @@ define([], function () {
|
|||||||
return openmct.$injector.get('dialogService').getUserInput(form, {});
|
return openmct.$injector.get('dialogService').getUserInput(form, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getPath() {
|
||||||
|
return `configuration.items[${selection[0].context.index}]`;
|
||||||
|
}
|
||||||
|
|
||||||
let selectedParent = selection[1] && selection[1].context.item,
|
let selectedParent = selection[1] && selection[1].context.item,
|
||||||
selectedObject = selection[0].context.item,
|
selectedObject = selection[0].context.item,
|
||||||
layoutItem = selection[0].context.layoutItem,
|
layoutItem = selection[0].context.layoutItem,
|
||||||
layoutItemIndex = selection[0].context.index,
|
|
||||||
toolbar = [];
|
toolbar = [];
|
||||||
|
|
||||||
if (selectedObject && selectedObject.type === 'layout') {
|
if (selectedObject && selectedObject.type === 'layout') {
|
||||||
@@ -121,7 +124,6 @@ define([], function () {
|
|||||||
return toolbar;
|
return toolbar;
|
||||||
}
|
}
|
||||||
|
|
||||||
let path = `configuration.items[${layoutItemIndex}]`;
|
|
||||||
let separator = {
|
let separator = {
|
||||||
control: "separator"
|
control: "separator"
|
||||||
};
|
};
|
||||||
@@ -140,7 +142,7 @@ define([], function () {
|
|||||||
label: 'Ok',
|
label: 'Ok',
|
||||||
emphasis: 'true',
|
emphasis: 'true',
|
||||||
callback: function () {
|
callback: function () {
|
||||||
removeItem(layoutItem, layoutItemIndex);
|
removeItem(layoutItem, selection[0].context.index);
|
||||||
prompt.dismiss();
|
prompt.dismiss();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -154,6 +156,96 @@ define([], function () {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
let stackOrder = {
|
||||||
|
control: "menu",
|
||||||
|
domainObject: selectedParent,
|
||||||
|
icon: "icon-layers",
|
||||||
|
title: "Move the selected object above or below other objects",
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
name: "Move to Top",
|
||||||
|
value: "top",
|
||||||
|
class: "icon-arrow-double-up"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Move Up",
|
||||||
|
value: "up",
|
||||||
|
class: "icon-arrow-up"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Move Down",
|
||||||
|
value: "down",
|
||||||
|
class: "icon-arrow-down"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Move to Bottom",
|
||||||
|
value: "bottom",
|
||||||
|
class: "icon-arrow-double-down"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
method: function (option) {
|
||||||
|
selection[1].context.orderItem(option.value, selection[0].context.index);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let useGrid = {
|
||||||
|
control: "toggle-button",
|
||||||
|
domainObject: selectedParent,
|
||||||
|
property: function () {
|
||||||
|
return getPath() + ".useGrid";
|
||||||
|
},
|
||||||
|
options: [
|
||||||
|
{
|
||||||
|
value: false,
|
||||||
|
icon: "icon-grid-snap-to",
|
||||||
|
title: "Grid snapping enabled"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: true,
|
||||||
|
icon: "icon-grid-snap-no",
|
||||||
|
title: "Grid snapping disabled"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
};
|
||||||
|
let x = {
|
||||||
|
control: "input",
|
||||||
|
type: "number",
|
||||||
|
domainObject: selectedParent,
|
||||||
|
property: function () {
|
||||||
|
return getPath() + ".x";
|
||||||
|
},
|
||||||
|
label: "X:",
|
||||||
|
title: "X position"
|
||||||
|
},
|
||||||
|
y = {
|
||||||
|
control: "input",
|
||||||
|
type: "number",
|
||||||
|
domainObject: selectedParent,
|
||||||
|
property: function () {
|
||||||
|
return getPath() + ".y";
|
||||||
|
},
|
||||||
|
label: "Y:",
|
||||||
|
title: "Y position",
|
||||||
|
},
|
||||||
|
width = {
|
||||||
|
control: 'input',
|
||||||
|
type: 'number',
|
||||||
|
domainObject: selectedParent,
|
||||||
|
property: function () {
|
||||||
|
return getPath() + ".width";
|
||||||
|
},
|
||||||
|
label: 'W:',
|
||||||
|
title: 'Resize object width'
|
||||||
|
},
|
||||||
|
height = {
|
||||||
|
control: 'input',
|
||||||
|
type: 'number',
|
||||||
|
domainObject: selectedParent,
|
||||||
|
property: function () {
|
||||||
|
return getPath() + ".height";
|
||||||
|
},
|
||||||
|
label: 'H:',
|
||||||
|
title: 'Resize object height'
|
||||||
|
};
|
||||||
|
|
||||||
if (layoutItem.type === 'subobject-view') {
|
if (layoutItem.type === 'subobject-view') {
|
||||||
if (toolbar.length > 0) {
|
if (toolbar.length > 0) {
|
||||||
@@ -163,124 +255,113 @@ define([], function () {
|
|||||||
toolbar.push({
|
toolbar.push({
|
||||||
control: "toggle-button",
|
control: "toggle-button",
|
||||||
domainObject: selectedParent,
|
domainObject: selectedParent,
|
||||||
property: path + ".hasFrame",
|
property: function () {
|
||||||
|
return getPath() + ".hasFrame";
|
||||||
|
},
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
value: false,
|
value: false,
|
||||||
icon: 'icon-frame-hide',
|
icon: 'icon-frame-show',
|
||||||
title: "Hide frame"
|
title: "Frame visible"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: true,
|
value: true,
|
||||||
icon: 'icon-frame-show',
|
icon: 'icon-frame-hide',
|
||||||
title: "Show frame"
|
title: "Frame hidden"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
toolbar.push(separator);
|
toolbar.push(separator);
|
||||||
|
toolbar.push(stackOrder);
|
||||||
|
toolbar.push(x);
|
||||||
|
toolbar.push(y);
|
||||||
|
toolbar.push(width);
|
||||||
|
toolbar.push(height);
|
||||||
|
toolbar.push(useGrid);
|
||||||
|
toolbar.push(separator);
|
||||||
toolbar.push(remove);
|
toolbar.push(remove);
|
||||||
} else {
|
} else {
|
||||||
const TEXT_SIZE = [9, 10, 11, 12, 13, 14, 15, 16, 20, 24, 30, 36, 48, 72, 96];
|
const TEXT_SIZE = [8, 9, 10, 11, 12, 13, 14, 15, 16, 20, 24, 30, 36, 48, 72, 96, 128];
|
||||||
let fill = {
|
let fill = {
|
||||||
control: "color-picker",
|
control: "color-picker",
|
||||||
domainObject: selectedParent,
|
domainObject: selectedParent,
|
||||||
property: path + ".fill",
|
property: function () {
|
||||||
icon: "icon-paint-bucket",
|
return getPath() + ".fill";
|
||||||
title: "Set fill color"
|
|
||||||
},
|
},
|
||||||
stroke = {
|
icon: "icon-paint-bucket",
|
||||||
control: "color-picker",
|
title: "Set fill color"
|
||||||
domainObject: selectedParent,
|
},
|
||||||
property: path + ".stroke",
|
stroke = {
|
||||||
icon: "icon-line-horz",
|
control: "color-picker",
|
||||||
title: "Set border color"
|
domainObject: selectedParent,
|
||||||
|
property: function () {
|
||||||
|
return getPath() + ".stroke";
|
||||||
},
|
},
|
||||||
color = {
|
icon: "icon-line-horz",
|
||||||
control: "color-picker",
|
title: "Set border color"
|
||||||
domainObject: selectedParent,
|
},
|
||||||
property: path + ".color",
|
color = {
|
||||||
icon: "icon-font",
|
control: "color-picker",
|
||||||
mandatory: true,
|
domainObject: selectedParent,
|
||||||
title: "Set text color",
|
property: function () {
|
||||||
preventNone: true
|
return getPath() + ".color";
|
||||||
},
|
},
|
||||||
size = {
|
icon: "icon-font",
|
||||||
control: "select-menu",
|
mandatory: true,
|
||||||
domainObject: selectedParent,
|
title: "Set text color",
|
||||||
property: path + ".size",
|
preventNone: true
|
||||||
title: "Set text size",
|
},
|
||||||
options: TEXT_SIZE.map(size => {
|
size = {
|
||||||
return {
|
control: "select-menu",
|
||||||
value: size + "px"
|
domainObject: selectedParent,
|
||||||
};
|
property: function () {
|
||||||
})
|
return getPath() + ".size";
|
||||||
},
|
},
|
||||||
x = {
|
title: "Set text size",
|
||||||
control: "input",
|
options: TEXT_SIZE.map(size => {
|
||||||
type: "number",
|
return {
|
||||||
domainObject: selectedParent,
|
value: size + "px"
|
||||||
property: path + ".x",
|
};
|
||||||
label: "X:",
|
})
|
||||||
title: "X position"
|
};
|
||||||
},
|
|
||||||
y = {
|
|
||||||
control: "input",
|
|
||||||
type: "number",
|
|
||||||
domainObject: selectedParent,
|
|
||||||
property: path + ".y",
|
|
||||||
label: "Y:",
|
|
||||||
title: "Y position",
|
|
||||||
},
|
|
||||||
width = {
|
|
||||||
control: 'input',
|
|
||||||
type: 'number',
|
|
||||||
domainObject: selectedParent,
|
|
||||||
property: path + ".width",
|
|
||||||
label: 'W:',
|
|
||||||
title: 'Resize object width'
|
|
||||||
},
|
|
||||||
height = {
|
|
||||||
control: 'input',
|
|
||||||
type: 'number',
|
|
||||||
domainObject: selectedParent,
|
|
||||||
property: path + ".height",
|
|
||||||
label: 'H:',
|
|
||||||
title: 'Resize object height'
|
|
||||||
};
|
|
||||||
|
|
||||||
if (layoutItem.type === 'telemetry-view') {
|
if (layoutItem.type === 'telemetry-view') {
|
||||||
let displayMode = {
|
let displayMode = {
|
||||||
control: "select-menu",
|
control: "select-menu",
|
||||||
domainObject: selectedParent,
|
domainObject: selectedParent,
|
||||||
property: path + ".displayMode",
|
property: function () {
|
||||||
title: "Set display mode",
|
return getPath() + ".displayMode";
|
||||||
options: [
|
|
||||||
{
|
|
||||||
name: 'Label + Value',
|
|
||||||
value: 'all'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Label only",
|
|
||||||
value: "label"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "Value only",
|
|
||||||
value: "value"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
value = {
|
title: "Set display mode",
|
||||||
control: "select-menu",
|
options: [
|
||||||
domainObject: selectedParent,
|
{
|
||||||
property: path + ".value",
|
name: 'Label + Value',
|
||||||
title: "Set value",
|
value: 'all'
|
||||||
options: openmct.telemetry.getMetadata(selectedObject).values().map(value => {
|
},
|
||||||
return {
|
{
|
||||||
name: value.name,
|
name: "Label only",
|
||||||
value: value.key
|
value: "label"
|
||||||
}
|
},
|
||||||
})
|
{
|
||||||
};
|
name: "Value only",
|
||||||
|
value: "value"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
value = {
|
||||||
|
control: "select-menu",
|
||||||
|
domainObject: selectedParent,
|
||||||
|
property: function () {
|
||||||
|
return getPath() + ".value";
|
||||||
|
},
|
||||||
|
title: "Set value",
|
||||||
|
options: openmct.telemetry.getMetadata(selectedObject).values().map(value => {
|
||||||
|
return {
|
||||||
|
name: value.name,
|
||||||
|
value: value.key
|
||||||
|
}
|
||||||
|
})
|
||||||
|
};
|
||||||
toolbar = [
|
toolbar = [
|
||||||
displayMode,
|
displayMode,
|
||||||
separator,
|
separator,
|
||||||
@@ -292,18 +373,22 @@ define([], function () {
|
|||||||
separator,
|
separator,
|
||||||
size,
|
size,
|
||||||
separator,
|
separator,
|
||||||
|
stackOrder,
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
height,
|
height,
|
||||||
width,
|
width,
|
||||||
|
useGrid,
|
||||||
separator,
|
separator,
|
||||||
remove
|
remove
|
||||||
];
|
];
|
||||||
} else if (layoutItem.type === 'text-view' ) {
|
} else if (layoutItem.type === 'text-view') {
|
||||||
let text = {
|
let text = {
|
||||||
control: "button",
|
control: "button",
|
||||||
domainObject: selectedParent,
|
domainObject: selectedParent,
|
||||||
property: path,
|
property: function () {
|
||||||
|
return getPath();
|
||||||
|
},
|
||||||
icon: "icon-gear",
|
icon: "icon-gear",
|
||||||
title: "Edit text properties",
|
title: "Edit text properties",
|
||||||
dialog: DIALOG_FORM['text']
|
dialog: DIALOG_FORM['text']
|
||||||
@@ -311,14 +396,16 @@ define([], function () {
|
|||||||
toolbar = [
|
toolbar = [
|
||||||
fill,
|
fill,
|
||||||
stroke,
|
stroke,
|
||||||
color,
|
|
||||||
separator,
|
separator,
|
||||||
|
color,
|
||||||
size,
|
size,
|
||||||
separator,
|
separator,
|
||||||
|
stackOrder,
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
height,
|
height,
|
||||||
width,
|
width,
|
||||||
|
useGrid,
|
||||||
separator,
|
separator,
|
||||||
text,
|
text,
|
||||||
separator,
|
separator,
|
||||||
@@ -329,10 +416,12 @@ define([], function () {
|
|||||||
fill,
|
fill,
|
||||||
stroke,
|
stroke,
|
||||||
separator,
|
separator,
|
||||||
|
stackOrder,
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
height,
|
height,
|
||||||
width,
|
width,
|
||||||
|
useGrid,
|
||||||
separator,
|
separator,
|
||||||
remove
|
remove
|
||||||
];
|
];
|
||||||
@@ -340,7 +429,9 @@ define([], function () {
|
|||||||
let url = {
|
let url = {
|
||||||
control: "button",
|
control: "button",
|
||||||
domainObject: selectedParent,
|
domainObject: selectedParent,
|
||||||
property: path,
|
property: function () {
|
||||||
|
return getPath();
|
||||||
|
},
|
||||||
icon: "icon-image",
|
icon: "icon-image",
|
||||||
title: "Edit image properties",
|
title: "Edit image properties",
|
||||||
dialog: DIALOG_FORM['image']
|
dialog: DIALOG_FORM['image']
|
||||||
@@ -348,10 +439,12 @@ define([], function () {
|
|||||||
toolbar = [
|
toolbar = [
|
||||||
stroke,
|
stroke,
|
||||||
separator,
|
separator,
|
||||||
|
stackOrder,
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
height,
|
height,
|
||||||
width,
|
width,
|
||||||
|
useGrid,
|
||||||
separator,
|
separator,
|
||||||
url,
|
url,
|
||||||
separator,
|
separator,
|
||||||
@@ -362,7 +455,9 @@ define([], function () {
|
|||||||
control: "input",
|
control: "input",
|
||||||
type: "number",
|
type: "number",
|
||||||
domainObject: selectedParent,
|
domainObject: selectedParent,
|
||||||
property: path + ".x2",
|
property: function () {
|
||||||
|
return getPath() + ".x2";
|
||||||
|
},
|
||||||
label: "X2:",
|
label: "X2:",
|
||||||
title: "X2 position"
|
title: "X2 position"
|
||||||
},
|
},
|
||||||
@@ -370,17 +465,21 @@ define([], function () {
|
|||||||
control: "input",
|
control: "input",
|
||||||
type: "number",
|
type: "number",
|
||||||
domainObject: selectedParent,
|
domainObject: selectedParent,
|
||||||
property: path + ".y2",
|
property: function () {
|
||||||
|
return getPath() + ".y2";
|
||||||
|
},
|
||||||
label: "Y2:",
|
label: "Y2:",
|
||||||
title: "Y2 position",
|
title: "Y2 position",
|
||||||
};
|
};
|
||||||
toolbar = [
|
toolbar = [
|
||||||
stroke,
|
stroke,
|
||||||
separator,
|
separator,
|
||||||
|
stackOrder,
|
||||||
x,
|
x,
|
||||||
y,
|
y,
|
||||||
x2,
|
x2,
|
||||||
y2,
|
y2,
|
||||||
|
useGrid,
|
||||||
separator,
|
separator,
|
||||||
remove
|
remove
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ define(function () {
|
|||||||
return {
|
return {
|
||||||
name: "Display Layout",
|
name: "Display Layout",
|
||||||
creatable: true,
|
creatable: true,
|
||||||
|
description: 'Assemble other objects and components together into a reusable screen layout. Simply drag in the objects you want, position and size them. Save your design and view or edit it at any time.',
|
||||||
cssClass: 'icon-layout',
|
cssClass: 'icon-layout',
|
||||||
initialize(domainObject) {
|
initialize(domainObject) {
|
||||||
domainObject.composition = [];
|
domainObject.composition = [];
|
||||||
|
|||||||
@@ -54,7 +54,8 @@
|
|||||||
x: 1,
|
x: 1,
|
||||||
y: 1,
|
y: 1,
|
||||||
width: 10,
|
width: 10,
|
||||||
height: 5
|
height: 5,
|
||||||
|
useGrid: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
inject: ['openmct'],
|
inject: ['openmct'],
|
||||||
|
|||||||
@@ -25,30 +25,26 @@
|
|||||||
@dragover="handleDragOver"
|
@dragover="handleDragOver"
|
||||||
@click="bypassSelection"
|
@click="bypassSelection"
|
||||||
@drop="handleDrop">
|
@drop="handleDrop">
|
||||||
<div class="l-layout__object">
|
<!-- Background grid -->
|
||||||
<!-- Background grid -->
|
<div class="l-layout__grid-holder c-grid">
|
||||||
<div class="l-layout__grid-holder c-grid"
|
<div class="c-grid__x l-grid l-grid-x"
|
||||||
v-if="!drilledIn">
|
v-if="gridSize[0] >= 3"
|
||||||
<div class="c-grid__x l-grid l-grid-x"
|
:style="[{ backgroundSize: gridSize[0] + 'px 100%' }]">
|
||||||
v-if="gridSize[0] >= 3"
|
|
||||||
:style="[{ backgroundSize: gridSize[0] + 'px 100%' }]">
|
|
||||||
</div>
|
|
||||||
<div class="c-grid__y l-grid l-grid-y"
|
|
||||||
v-if="gridSize[1] >= 3"
|
|
||||||
:style="[{ backgroundSize: '100%' + gridSize[1] + 'px' }]"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<component v-for="(item, index) in layoutItems"
|
<div class="c-grid__y l-grid l-grid-y"
|
||||||
:is="item.type"
|
v-if="gridSize[1] >= 3"
|
||||||
:item="item"
|
:style="[{ backgroundSize: '100%' + gridSize[1] + 'px' }]"></div>
|
||||||
:key="item.id"
|
|
||||||
:gridSize="gridSize"
|
|
||||||
:initSelect="initSelectIndex === index"
|
|
||||||
:index="index"
|
|
||||||
@drilledIn="updateDrilledIn"
|
|
||||||
@endDrag="endDrag"
|
|
||||||
>
|
|
||||||
</component>
|
|
||||||
</div>
|
</div>
|
||||||
|
<component v-for="(item, index) in layoutItems"
|
||||||
|
:is="item.type"
|
||||||
|
:item="item"
|
||||||
|
:key="item.id"
|
||||||
|
:gridSize="item.useGrid ? gridSize : [1, 1]"
|
||||||
|
:initSelect="initSelectIndex === index"
|
||||||
|
:index="index"
|
||||||
|
@endDrag="endDrag"
|
||||||
|
>
|
||||||
|
</component>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -59,30 +55,47 @@
|
|||||||
@include abs();
|
@include abs();
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
overflow: auto;
|
||||||
|
|
||||||
&__grid-holder {
|
&__grid-holder {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__object {
|
|
||||||
flex: 1 1 auto;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__frame {
|
&__frame {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.l-shell__main-container {
|
.is-editing {
|
||||||
> .l-layout {
|
.l-shell__main-container {
|
||||||
[s-selected] {
|
&[s-selected],
|
||||||
border: $browseSelectedBorder;
|
&[s-selected-parent] {
|
||||||
|
// Display grid in main layout holder when editing
|
||||||
|
> .l-layout {
|
||||||
|
background: $editUIGridColorBg;
|
||||||
|
|
||||||
|
> [class*="__grid-holder"] {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.l-layout__frame {
|
||||||
|
&[s-selected],
|
||||||
|
&[s-selected-parent] {
|
||||||
|
// Display grid in nested layouts when editing
|
||||||
|
> * > * > .l-layout {
|
||||||
|
background: $editUIGridColorBg;
|
||||||
|
box-shadow: inset $editUIGridColorFg 0 0 2px 1px;
|
||||||
|
|
||||||
|
> [class*='grid-holder'] {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Styles moved to _global.scss;
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
||||||
@@ -104,6 +117,12 @@
|
|||||||
'text-view': TextView,
|
'text-view': TextView,
|
||||||
'image-view': ImageView
|
'image-view': ImageView
|
||||||
};
|
};
|
||||||
|
const ORDERS = {
|
||||||
|
top: Number.POSITIVE_INFINITY,
|
||||||
|
up: 1,
|
||||||
|
down: -1,
|
||||||
|
bottom: Number.NEGATIVE_INFINITY
|
||||||
|
};
|
||||||
|
|
||||||
function getItemDefinition(itemType, ...options) {
|
function getItemDefinition(itemType, ...options) {
|
||||||
let itemView = ITEM_TYPE_VIEW_MAP[itemType];
|
let itemView = ITEM_TYPE_VIEW_MAP[itemType];
|
||||||
@@ -119,7 +138,6 @@
|
|||||||
data() {
|
data() {
|
||||||
let domainObject = JSON.parse(JSON.stringify(this.domainObject));
|
let domainObject = JSON.parse(JSON.stringify(this.domainObject));
|
||||||
return {
|
return {
|
||||||
drilledIn: undefined,
|
|
||||||
internalDomainObject: domainObject,
|
internalDomainObject: domainObject,
|
||||||
initSelectIndex: undefined
|
initSelectIndex: undefined
|
||||||
};
|
};
|
||||||
@@ -144,16 +162,49 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.updateDrilledIn();
|
if (this.removeSelectionListener) {
|
||||||
|
this.removeSelectionListener();
|
||||||
|
}
|
||||||
|
|
||||||
|
let itemIndex = selection[0].context.index;
|
||||||
|
|
||||||
|
if (itemIndex !== undefined) {
|
||||||
|
this.attachSelectionListener(itemIndex);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
updateDrilledIn(drilledInItem) {
|
attachSelectionListener(index) {
|
||||||
let identifier = drilledInItem && this.openmct.objects.makeKeyString(drilledInItem.identifier);
|
let path = `configuration.items[${index}].useGrid`;
|
||||||
this.drilledIn = identifier;
|
this.removeSelectionListener = this.openmct.objects.observe(this.internalDomainObject, path, function (value) {
|
||||||
this.layoutItems.forEach(item => {
|
let item = this.layoutItems[index];
|
||||||
if (item.type === 'subobject-view') {
|
|
||||||
item.drilledIn = this.openmct.objects.makeKeyString(item.identifier) === identifier;
|
if (value) {
|
||||||
|
item.x = Math.round(item.x / this.gridSize[0]);
|
||||||
|
item.y = Math.round(item.y / this.gridSize[1]);
|
||||||
|
item.width = Math.round(item.width / this.gridSize[0]);
|
||||||
|
item.height = Math.round(item.height / this.gridSize[1]);
|
||||||
|
|
||||||
|
if (item.x2) {
|
||||||
|
item.x2 = Math.round(item.x2 / this.gridSize[0]);
|
||||||
|
}
|
||||||
|
if (item.y2) {
|
||||||
|
item.y2 = Math.round(item.y2 / this.gridSize[1]);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
item.x = this.gridSize[0] * item.x;
|
||||||
|
item.y = this.gridSize[1] * item.y;
|
||||||
|
item.width = this.gridSize[0] * item.width;
|
||||||
|
item.height = this.gridSize[1] * item.height;
|
||||||
|
|
||||||
|
if (item.x2) {
|
||||||
|
item.x2 = this.gridSize[0] * item.x2;
|
||||||
|
}
|
||||||
|
if (item.y2) {
|
||||||
|
item.y2 = this.gridSize[1] * item.y2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
item.useGrid = value;
|
||||||
|
this.mutate(`configuration.items[${index}]`, item);
|
||||||
|
}.bind(this));
|
||||||
},
|
},
|
||||||
bypassSelection($event) {
|
bypassSelection($event) {
|
||||||
if (this.dragInProgress) {
|
if (this.dragInProgress) {
|
||||||
@@ -177,13 +228,13 @@
|
|||||||
this.openmct.objects.mutate(this.internalDomainObject, path, value);
|
this.openmct.objects.mutate(this.internalDomainObject, path, value);
|
||||||
},
|
},
|
||||||
handleDrop($event) {
|
handleDrop($event) {
|
||||||
if (!$event.dataTransfer.types.includes('domainobject')) {
|
if (!$event.dataTransfer.types.includes('openmct/domain-object-path')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$event.preventDefault();
|
$event.preventDefault();
|
||||||
|
|
||||||
let domainObject = JSON.parse($event.dataTransfer.getData('domainobject'));
|
let domainObject = JSON.parse($event.dataTransfer.getData('openmct/domain-object-path'))[0];
|
||||||
let elementRect = this.$el.getBoundingClientRect();
|
let elementRect = this.$el.getBoundingClientRect();
|
||||||
let droppedObjectPosition = [
|
let droppedObjectPosition = [
|
||||||
Math.floor(($event.pageX - elementRect.left) / this.gridSize[0]),
|
Math.floor(($event.pageX - elementRect.left) / this.gridSize[0]),
|
||||||
@@ -234,12 +285,17 @@
|
|||||||
this.initSelectIndex = this.layoutItems.length - 1;
|
this.initSelectIndex = this.layoutItems.length - 1;
|
||||||
},
|
},
|
||||||
trackItem(item) {
|
trackItem(item) {
|
||||||
|
if (!item.identifier) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let keyString = this.openmct.objects.makeKeyString(item.identifier);
|
||||||
|
|
||||||
if (item.type === "telemetry-view") {
|
if (item.type === "telemetry-view") {
|
||||||
let keyString = this.openmct.objects.makeKeyString(item.identifier);
|
|
||||||
let count = this.telemetryViewMap[keyString] || 0;
|
let count = this.telemetryViewMap[keyString] || 0;
|
||||||
this.telemetryViewMap[keyString] = ++count;
|
this.telemetryViewMap[keyString] = ++count;
|
||||||
} else if (item.type === "subobject-view") {
|
} else if (item.type === "subobject-view") {
|
||||||
this.objectViewMap[this.openmct.objects.makeKeyString(item.identifier)] = true;
|
this.objectViewMap[keyString] = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
removeItem(item, index) {
|
removeItem(item, index) {
|
||||||
@@ -311,13 +367,28 @@
|
|||||||
});
|
});
|
||||||
this.mutate("configuration.items", layoutItems);
|
this.mutate("configuration.items", layoutItems);
|
||||||
this.$el.click();
|
this.$el.click();
|
||||||
|
},
|
||||||
|
orderItem(position, index) {
|
||||||
|
let delta = ORDERS[position];
|
||||||
|
let newIndex = Math.max(Math.min(index + delta, this.layoutItems.length - 1), 0);
|
||||||
|
let item = this.layoutItems[index];
|
||||||
|
|
||||||
|
if (newIndex !== index) {
|
||||||
|
this.layoutItems.splice(index, 1);
|
||||||
|
this.layoutItems.splice(newIndex, 0, item);
|
||||||
|
this.mutate('configuration.items', this.layoutItems);
|
||||||
|
|
||||||
|
if (this.removeSelectionListener) {
|
||||||
|
this.removeSelectionListener();
|
||||||
|
this.attachSelectionListener(newIndex);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.unlisten = this.openmct.objects.observe(this.internalDomainObject, '*', function (obj) {
|
this.unlisten = this.openmct.objects.observe(this.internalDomainObject, '*', function (obj) {
|
||||||
this.internalDomainObject = JSON.parse(JSON.stringify(obj));
|
this.internalDomainObject = JSON.parse(JSON.stringify(obj));
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
|
|
||||||
this.openmct.selection.on('change', this.setSelection);
|
this.openmct.selection.on('change', this.setSelection);
|
||||||
this.initializeItems();
|
this.initializeItems();
|
||||||
this.composition = this.openmct.composition.get(this.internalDomainObject);
|
this.composition = this.openmct.composition.get(this.internalDomainObject);
|
||||||
@@ -330,7 +401,10 @@
|
|||||||
this.composition.off('add', this.addChild);
|
this.composition.off('add', this.addChild);
|
||||||
this.composition.off('remove', this.removeChild);
|
this.composition.off('remove', this.removeChild);
|
||||||
this.unlisten();
|
this.unlisten();
|
||||||
|
|
||||||
|
if (this.removeSelectionListener) {
|
||||||
|
this.removeSelectionListener();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -56,7 +56,8 @@
|
|||||||
y: 1,
|
y: 1,
|
||||||
width: 10,
|
width: 10,
|
||||||
height: 5,
|
height: 5,
|
||||||
url: element.url
|
url: element.url,
|
||||||
|
useGrid: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
inject: ['openmct'],
|
inject: ['openmct'],
|
||||||
|
|||||||
@@ -25,25 +25,24 @@
|
|||||||
:class="{
|
:class="{
|
||||||
'no-frame': !item.hasFrame,
|
'no-frame': !item.hasFrame,
|
||||||
'u-inspectable': inspectable,
|
'u-inspectable': inspectable,
|
||||||
'is-drilled-in': item.drilledIn
|
'is-resizing': isResizing
|
||||||
}"
|
}"
|
||||||
:style="style"
|
:style="style">
|
||||||
@dblclick="drill($event)">
|
|
||||||
|
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
|
|
||||||
<!-- Drag handles -->
|
<!-- Drag handles -->
|
||||||
<div class="c-frame-edit">
|
<div class="c-frame-edit">
|
||||||
<div class="c-frame-edit__move"
|
<div class="c-frame-edit__move"
|
||||||
@mousedown="startDrag([1,1], [0,0], $event)"></div>
|
@mousedown="startDrag([1,1], [0,0], $event, 'move')"></div>
|
||||||
<div class="c-frame-edit__handle c-frame-edit__handle--nw"
|
<div class="c-frame-edit__handle c-frame-edit__handle--nw"
|
||||||
@mousedown="startDrag([1,1], [-1,-1], $event)"></div>
|
@mousedown="startDrag([1,1], [-1,-1], $event, 'resize')"></div>
|
||||||
<div class="c-frame-edit__handle c-frame-edit__handle--ne"
|
<div class="c-frame-edit__handle c-frame-edit__handle--ne"
|
||||||
@mousedown="startDrag([0,1], [1,-1], $event)"></div>
|
@mousedown="startDrag([0,1], [1,-1], $event, 'resize')"></div>
|
||||||
<div class="c-frame-edit__handle c-frame-edit__handle--sw"
|
<div class="c-frame-edit__handle c-frame-edit__handle--sw"
|
||||||
@mousedown="startDrag([1,0], [-1,1], $event)"></div>
|
@mousedown="startDrag([1,0], [-1,1], $event, 'resize')"></div>
|
||||||
<div class="c-frame-edit__handle c-frame-edit__handle--se"
|
<div class="c-frame-edit__handle c-frame-edit__handle--se"
|
||||||
@mousedown="startDrag([0,0], [1,1], $event)"></div>
|
@mousedown="startDrag([0,0], [1,1], $event, 'resize')"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -55,20 +54,167 @@
|
|||||||
.c-frame {
|
.c-frame {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
border: 1px solid transparent;
|
|
||||||
|
|
||||||
/*************************** NO-FRAME */
|
// Whatever is placed into the slot, make it fill the entirety of the space, obeying padding
|
||||||
&.no-frame {
|
> *:first-child {
|
||||||
> [class*="contents"] > [class*="__header"] {
|
flex: 1 1 auto;
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:not(.no-frame) {
|
&:not(.no-frame) {
|
||||||
background: $colorBodyBg;
|
background: $colorBodyBg;
|
||||||
border: 1px solid $colorInteriorBorder;
|
border: $browseFrameBorder;
|
||||||
padding: $interiorMargin;
|
padding: $interiorMargin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.c-frame-edit {
|
||||||
|
// In Layouts, this is the editing rect and handles
|
||||||
|
// In Fixed Position, this is a wrapper element
|
||||||
|
@include abs();
|
||||||
|
display: none;
|
||||||
|
|
||||||
|
&__move {
|
||||||
|
@include abs();
|
||||||
|
cursor: move;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__handle {
|
||||||
|
$d: 6px;
|
||||||
|
$o: floor($d * -0.5);
|
||||||
|
background: $editFrameColorHandleFg;
|
||||||
|
box-shadow: $editFrameColorHandleBg 0 0 0 2px;
|
||||||
|
display: none; // Set to block via s-selected selector
|
||||||
|
position: absolute;
|
||||||
|
width: $d; height: $d;
|
||||||
|
top: auto; right: auto; bottom: auto; left: auto;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
// Extended hit area
|
||||||
|
@include abs(-10px);
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: $editUIColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--nwse {
|
||||||
|
cursor: nwse-resize;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--nw {
|
||||||
|
cursor: nw-resize;
|
||||||
|
left: $o; top: $o;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--ne {
|
||||||
|
cursor: ne-resize;
|
||||||
|
right: $o; top: $o;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--se {
|
||||||
|
cursor: se-resize;
|
||||||
|
right: $o; bottom: $o;
|
||||||
|
}
|
||||||
|
|
||||||
|
&--sw {
|
||||||
|
cursor: sw-resize;
|
||||||
|
left: $o; bottom: $o;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.c-so-view.has-complex-content + .c-frame-edit {
|
||||||
|
// Target frames that hold domain objects that include header elements, as opposed to drawing and alpha objects
|
||||||
|
// Make the __move element a more affordable drag UI element
|
||||||
|
.c-frame-edit__move {
|
||||||
|
@include userSelectNone();
|
||||||
|
background: $editFrameMovebarColorBg;
|
||||||
|
box-shadow: rgba(black, 0.2) 0 1px;
|
||||||
|
bottom: auto;
|
||||||
|
height: 0; // Height is set on hover on s-selected.c-frame
|
||||||
|
opacity: 0.8;
|
||||||
|
max-height: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
// Grippy
|
||||||
|
$h: 4px;
|
||||||
|
$tbOffset: ($editFrameMovebarH - $h) / 2;
|
||||||
|
$lrOffset: 25%;
|
||||||
|
@include grippy($editFrameMovebarColorFg);
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
top: $tbOffset; right: $lrOffset; bottom: $tbOffset; left: $lrOffset;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: $editFrameHovMovebarColorBg;
|
||||||
|
&:before { @include grippy($editFrameHovMovebarColorFg); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.is-editing {
|
||||||
|
.c-frame {
|
||||||
|
$moveBarOutDelay: 500ms;
|
||||||
|
&.no-frame {
|
||||||
|
border: $editFrameBorder; // Base border style for a frame element while editing.
|
||||||
|
}
|
||||||
|
|
||||||
|
&-edit {
|
||||||
|
display: contents;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-edit__move,
|
||||||
|
.c-so-view {
|
||||||
|
transition: $transOut;
|
||||||
|
transition-delay: $moveBarOutDelay;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:not([s-selected]) {
|
||||||
|
&:hover {
|
||||||
|
border: $editFrameBorderHov;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&[s-selected] {
|
||||||
|
// All frames selected while editing
|
||||||
|
border: $editFrameSelectedBorder;
|
||||||
|
box-shadow: $editFrameSelectedShdw;
|
||||||
|
|
||||||
|
> .c-frame-edit {
|
||||||
|
[class*='__handle'] {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.l-layout__frame:not(.is-resizing) {
|
||||||
|
// Show and animate the __move bar for sub-object views with complex content
|
||||||
|
&:hover > .c-so-view.has-complex-content {
|
||||||
|
// Move content down so the __move bar doesn't cover it.
|
||||||
|
padding-top: $editFrameMovebarH;
|
||||||
|
transition: $transIn;
|
||||||
|
|
||||||
|
&.c-so-view--no-frame {
|
||||||
|
// Move content down with a bit more space
|
||||||
|
padding-top: $editFrameMovebarH + $interiorMarginSm;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Show the move bar
|
||||||
|
+ .c-frame-edit .c-frame-edit__move {
|
||||||
|
height: $editFrameMovebarH;
|
||||||
|
transition: $transIn;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@@ -84,7 +230,8 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dragPosition: undefined
|
dragPosition: undefined,
|
||||||
|
isResizing: undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -110,24 +257,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
drill($event) {
|
|
||||||
if ($event) {
|
|
||||||
$event.stopPropagation();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!this.openmct.editor.isEditing() || !this.item.identifier) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.openmct.objects.get(this.item.identifier)
|
|
||||||
.then(domainObject => {
|
|
||||||
if (this.openmct.composition.get(domainObject) === undefined) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$emit('drilledIn', this.item);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
updatePosition(event) {
|
updatePosition(event) {
|
||||||
let currentPosition = [event.pageX, event.pageY];
|
let currentPosition = [event.pageX, event.pageY];
|
||||||
this.initialPosition = this.initialPosition || currentPosition;
|
this.initialPosition = this.initialPosition || currentPosition;
|
||||||
@@ -135,7 +264,7 @@
|
|||||||
return value - this.initialPosition[index];
|
return value - this.initialPosition[index];
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
},
|
},
|
||||||
startDrag(posFactor, dimFactor, event) {
|
startDrag(posFactor, dimFactor, event, type) {
|
||||||
document.body.addEventListener('mousemove', this.continueDrag);
|
document.body.addEventListener('mousemove', this.continueDrag);
|
||||||
document.body.addEventListener('mouseup', this.endDrag);
|
document.body.addEventListener('mouseup', this.endDrag);
|
||||||
|
|
||||||
@@ -145,6 +274,7 @@
|
|||||||
};
|
};
|
||||||
this.updatePosition(event);
|
this.updatePosition(event);
|
||||||
this.activeDrag = new LayoutDrag(this.dragPosition, posFactor, dimFactor, this.gridSize);
|
this.activeDrag = new LayoutDrag(this.dragPosition, posFactor, dimFactor, this.gridSize);
|
||||||
|
this.isResizing = type === 'resize';
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
},
|
},
|
||||||
continueDrag(event) {
|
continueDrag(event) {
|
||||||
@@ -162,6 +292,7 @@
|
|||||||
this.dragPosition = undefined;
|
this.dragPosition = undefined;
|
||||||
this.initialPosition = undefined;
|
this.initialPosition = undefined;
|
||||||
this.delta = undefined;
|
this.delta = undefined;
|
||||||
|
this.isResizing = undefined;
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,7 +66,8 @@
|
|||||||
y: 10,
|
y: 10,
|
||||||
x2: 10,
|
x2: 10,
|
||||||
y2: 5,
|
y2: 5,
|
||||||
stroke: '#717171'
|
stroke: '#717171',
|
||||||
|
useGrid: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
inject: ['openmct'],
|
inject: ['openmct'],
|
||||||
|
|||||||
@@ -22,8 +22,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<layout-frame :item="item"
|
<layout-frame :item="item"
|
||||||
:grid-size="gridSize"
|
:grid-size="gridSize"
|
||||||
@endDrag="(item, updates) => $emit('endDrag', item, updates)"
|
@endDrag="(item, updates) => $emit('endDrag', item, updates)">
|
||||||
@drilledIn="item => $emit('drilledIn', item)">
|
|
||||||
<object-frame v-if="domainObject"
|
<object-frame v-if="domainObject"
|
||||||
:domain-object="domainObject"
|
:domain-object="domainObject"
|
||||||
:object-path="objectPath"
|
:object-path="objectPath"
|
||||||
@@ -65,7 +64,8 @@
|
|||||||
x: position[0],
|
x: position[0],
|
||||||
y: position[1],
|
y: position[1],
|
||||||
identifier: domainObject.identifier,
|
identifier: domainObject.identifier,
|
||||||
hasFrame: hasFrameByDefault(domainObject.type)
|
hasFrame: hasFrameByDefault(domainObject.type),
|
||||||
|
useGrid: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
inject: ['openmct'],
|
inject: ['openmct'],
|
||||||
|
|||||||
@@ -99,6 +99,7 @@
|
|||||||
fill: "",
|
fill: "",
|
||||||
color: "",
|
color: "",
|
||||||
size: "13px",
|
size: "13px",
|
||||||
|
useGrid: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
inject: ['openmct'],
|
inject: ['openmct'],
|
||||||
|
|||||||
@@ -59,7 +59,8 @@
|
|||||||
y: 1,
|
y: 1,
|
||||||
width: 10,
|
width: 10,
|
||||||
height: 5,
|
height: 5,
|
||||||
text: element.text
|
text: element.text,
|
||||||
|
useGrid: true
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
inject: ['openmct'],
|
inject: ['openmct'],
|
||||||
|
|||||||
@@ -61,7 +61,8 @@ export default function () {
|
|||||||
return {
|
return {
|
||||||
item: domainObject,
|
item: domainObject,
|
||||||
addElement: component && component.$refs.displayLayout.addElement,
|
addElement: component && component.$refs.displayLayout.addElement,
|
||||||
removeItem: component && component.$refs.displayLayout.removeItem
|
removeItem: component && component.$refs.displayLayout.removeItem,
|
||||||
|
orderItem: component && component.$refs.displayLayout.orderItem
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
destroy() {
|
destroy() {
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<div class="c-fl-container"
|
<div class="c-fl-container"
|
||||||
:style="[{'flex-basis': sizeString}]"
|
:style="[{'flex-basis': sizeString}]"
|
||||||
:class="{'is-empty': !frames.length}">
|
:class="{'is-empty': !frames.length}">
|
||||||
<div class="c-fl-container__header icon-grippy-ew"
|
<div class="c-fl-container__header"
|
||||||
v-show="isEditing"
|
v-show="isEditing"
|
||||||
draggable="true"
|
draggable="true"
|
||||||
@dragstart="startContainerDrag">
|
@dragstart="startContainerDrag">
|
||||||
@@ -100,7 +100,7 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
allowDrop(event, index) {
|
allowDrop(event, index) {
|
||||||
if (event.dataTransfer.getData('domainObject')) {
|
if (event.dataTransfer.types.includes('openmct/domain-object-path')) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
let frameId = event.dataTransfer.getData('frameid'),
|
let frameId = event.dataTransfer.getData('frameid'),
|
||||||
@@ -124,9 +124,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
moveOrCreateFrame(insertIndex, event) {
|
moveOrCreateFrame(insertIndex, event) {
|
||||||
if (event.dataTransfer.types.includes('domainobject')) {
|
if (event.dataTransfer.types.includes('openmct/domain-object-path')) {
|
||||||
// create frame using domain object
|
// create frame using domain object
|
||||||
let domainObject = JSON.parse(event.dataTransfer.getData('domainObject'));
|
let domainObject = JSON.parse(event.dataTransfer.getData('openmct/domain-object-path'))[0];
|
||||||
this.$emit(
|
this.$emit(
|
||||||
'create-frame',
|
'create-frame',
|
||||||
this.index,
|
this.index,
|
||||||
|
|||||||
@@ -21,8 +21,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-if="isEditing"
|
<div v-show="isValidTarget">
|
||||||
v-show="isValidTarget">
|
|
||||||
<div class="c-drop-hint c-drop-hint--always-show"
|
<div class="c-drop-hint c-drop-hint--always-show"
|
||||||
:class="{'is-mouse-over': isMouseOver}"
|
:class="{'is-mouse-over': isMouseOver}"
|
||||||
@dragenter="dragenter"
|
@dragenter="dragenter"
|
||||||
@@ -37,8 +36,6 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import isEditingMixin from '../mixins/isEditing';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props:{
|
props:{
|
||||||
index: Number,
|
index: Number,
|
||||||
@@ -47,7 +44,6 @@ export default {
|
|||||||
required: true
|
required: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mixins: [isEditingMixin],
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
isMouseOver: false,
|
isMouseOver: false,
|
||||||
|
|||||||
@@ -79,6 +79,22 @@
|
|||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '~styles/sass-base';
|
@import '~styles/sass-base';
|
||||||
|
|
||||||
|
@mixin containerGrippy($headerSize, $dir) {
|
||||||
|
position: absolute;
|
||||||
|
$h: 6px;
|
||||||
|
$minorOffset: ($headerSize - $h) / 2;
|
||||||
|
$majorOffset: 35%;
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
position: absolute;
|
||||||
|
@include grippy($c: $editFrameSelectedMovebarColorFg, $dir: $dir);
|
||||||
|
@if $dir == 'x' {
|
||||||
|
top: $minorOffset; right: $majorOffset; bottom: $minorOffset; left: $majorOffset;
|
||||||
|
} @else {
|
||||||
|
top: $majorOffset; right: $minorOffset; bottom: $majorOffset; left: $minorOffset;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.c-fl {
|
.c-fl {
|
||||||
@include abs();
|
@include abs();
|
||||||
@@ -100,7 +116,6 @@
|
|||||||
> * + * { margin-left: 1px; }
|
> * + * { margin-left: 1px; }
|
||||||
|
|
||||||
&[class*='--rows'] {
|
&[class*='--rows'] {
|
||||||
//@include test(blue, 0.1);
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
> * + * {
|
> * + * {
|
||||||
margin-left: 0;
|
margin-left: 0;
|
||||||
@@ -128,7 +143,6 @@
|
|||||||
/***************************************************** CONTAINERS */
|
/***************************************************** CONTAINERS */
|
||||||
$headerSize: 16px;
|
$headerSize: 16px;
|
||||||
|
|
||||||
border: 1px solid transparent;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
@@ -138,9 +152,9 @@
|
|||||||
flex-shrink: 1;
|
flex-shrink: 1;
|
||||||
|
|
||||||
&__header {
|
&__header {
|
||||||
// Only displayed when editing
|
// Only displayed when editing, controlled via JS
|
||||||
background: $editSelectableColor;
|
background: $editFrameMovebarColorBg;
|
||||||
color: $editSelectableColorFg;
|
color: $editFrameMovebarColorFg;
|
||||||
cursor: move;
|
cursor: move;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -148,12 +162,8 @@
|
|||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
// Drag grippy
|
// Drag grippy
|
||||||
font-size: 0.8em;
|
@include containerGrippy($headerSize, 'x');
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
position: absolute;
|
|
||||||
left: 50%; top: 50%;
|
|
||||||
transform-origin: center;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -173,19 +183,27 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.is-editing & {
|
.is-editing & {
|
||||||
//background: $editCanvasColorBg;
|
|
||||||
border-color: $editSelectableColor;
|
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
border-color: $editSelectableColorHov;
|
.c-fl-container__header {
|
||||||
|
background: $editFrameHovMovebarColorBg;
|
||||||
|
color: $editFrameHovMovebarColorFg;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
opacity: .75;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&[s-selected] {
|
&[s-selected] {
|
||||||
border-color: $editSelectableColorSelected;
|
border: $editFrameSelectedBorder;
|
||||||
|
|
||||||
.c-fl-container__header {
|
.c-fl-container__header {
|
||||||
background: $editSelectableColorSelected;
|
background:$editFrameSelectedMovebarColorBg;
|
||||||
color: $editSelectableColorSelectedFg;
|
color: $editFrameSelectedMovebarColorFg;
|
||||||
|
&:before {
|
||||||
|
// Grippy
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -194,11 +212,6 @@
|
|||||||
// Frames get styled here because this is particular to their presence in this layout type
|
// Frames get styled here because this is particular to their presence in this layout type
|
||||||
.c-fl-frame {
|
.c-fl-frame {
|
||||||
@include browserPrefix(margin-collapse, collapse);
|
@include browserPrefix(margin-collapse, collapse);
|
||||||
margin: 1px;
|
|
||||||
|
|
||||||
//&__drag-wrapper {
|
|
||||||
// border: 1px solid $colorInteriorBorder; // Now handled by is-selectable
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/****** ROWS LAYOUT */
|
/****** ROWS LAYOUT */
|
||||||
@@ -211,8 +224,8 @@
|
|||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
// Drag grippy
|
// Grippy
|
||||||
transform: rotate(90deg) translate(-50%, 50%);
|
@include containerGrippy($headerSize, 'y');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,8 +248,6 @@
|
|||||||
$dropHintSize: 15px;
|
$dropHintSize: 15px;
|
||||||
|
|
||||||
display: flex;
|
display: flex;
|
||||||
// justify-content: stretch;
|
|
||||||
// align-items: stretch;
|
|
||||||
flex: 1 1;
|
flex: 1 1;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
overflow: hidden; // Needed to allow frames to collapse when sized down
|
overflow: hidden; // Needed to allow frames to collapse when sized down
|
||||||
@@ -275,7 +286,6 @@
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: $size;
|
width: $size;
|
||||||
z-index: 2;
|
|
||||||
|
|
||||||
// Changed when layout is different, see below
|
// Changed when layout is different, see below
|
||||||
border-top-right-radius: $controlCr;
|
border-top-right-radius: $controlCr;
|
||||||
@@ -304,37 +314,16 @@
|
|||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
// The visible resize line
|
// The visible resize line
|
||||||
background: $editColor;
|
background: $editUIColor;
|
||||||
content: '';
|
content: '';
|
||||||
display: block;
|
display: block;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
min-height: $size; min-width: $size;
|
min-height: $size; min-width: $size;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__grippy {
|
|
||||||
// Grippy element
|
|
||||||
$d: 4px;
|
|
||||||
$c: black;
|
|
||||||
$a: 0.9;
|
|
||||||
$d: 5px;
|
|
||||||
background: $editColor;
|
|
||||||
color: $editColorBg;
|
|
||||||
border-radius: $smallCr;
|
|
||||||
font-size: 0.8em;
|
|
||||||
height: $d;
|
|
||||||
width: $d * 10;
|
|
||||||
position: absolute;
|
|
||||||
left: 50%; top: 50%;
|
|
||||||
text-align: center;
|
|
||||||
transform-origin: center center;
|
|
||||||
transform: translate(-50%, -50%);
|
|
||||||
z-index: 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.vertical {
|
&.vertical {
|
||||||
padding: $margin $size;
|
padding: $margin $size;
|
||||||
&:hover{
|
&:hover{
|
||||||
// padding: $marginHov 0;
|
|
||||||
cursor: row-resize;
|
cursor: row-resize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -342,20 +331,15 @@
|
|||||||
&.horizontal {
|
&.horizontal {
|
||||||
padding: $size $margin;
|
padding: $size $margin;
|
||||||
&:hover{
|
&:hover{
|
||||||
// padding: 0 $marginHov;
|
|
||||||
cursor: col-resize;
|
cursor: col-resize;
|
||||||
}
|
}
|
||||||
|
|
||||||
[class*='grippy'] {
|
|
||||||
transform: translate(-50%) rotate(90deg);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
transition: $transOut;
|
transition: $transOut;
|
||||||
&:before {
|
&:before {
|
||||||
// The visible resize line
|
// The visible resize line
|
||||||
background: $editColorHov;
|
background: $editUIColorHov;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
'flex-basis': `${frame.size}%`
|
'flex-basis': `${frame.size}%`
|
||||||
}">
|
}">
|
||||||
|
|
||||||
<div class="c-frame c-fl-frame__drag-wrapper is-selectable is-moveable"
|
<div class="c-frame c-fl-frame__drag-wrapper is-selectable u-inspectable is-moveable"
|
||||||
draggable="true"
|
draggable="true"
|
||||||
@dragstart="initDrag"
|
@dragstart="initDrag"
|
||||||
ref="frame">
|
ref="frame">
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ define([
|
|||||||
containers: [new Container.default(50), new Container.default(50)],
|
containers: [new Container.default(50), new Container.default(50)],
|
||||||
rowsLayout: false
|
rowsLayout: false
|
||||||
};
|
};
|
||||||
|
domainObject.composition = [];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -57,14 +57,14 @@ function ToolbarProvider(openmct) {
|
|||||||
property: 'configuration.rowsLayout',
|
property: 'configuration.rowsLayout',
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
value: false,
|
value: true,
|
||||||
icon: 'icon-columns',
|
icon: 'icon-columns',
|
||||||
title: 'Columns'
|
title: 'Columns layout'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: true,
|
value: false,
|
||||||
icon: 'icon-rows',
|
icon: 'icon-rows',
|
||||||
title: 'Rows'
|
title: 'Rows layout'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
@@ -120,14 +120,14 @@ function ToolbarProvider(openmct) {
|
|||||||
property: `configuration.containers[${containerIndex}].frames[${frameIndex}].noFrame`,
|
property: `configuration.containers[${containerIndex}].frames[${frameIndex}].noFrame`,
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
value: true,
|
value: false,
|
||||||
icon: 'icon-frame-hide',
|
icon: 'icon-frame-hide',
|
||||||
title: "Hide frame"
|
title: "Frame hidden"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: false,
|
value: true,
|
||||||
icon: 'icon-frame-show',
|
icon: 'icon-frame-show',
|
||||||
title: "Show frame"
|
title: "Frame visible"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,9 +4,8 @@
|
|||||||
@click="navigate">
|
@click="navigate">
|
||||||
<td class="c-list-item__name">
|
<td class="c-list-item__name">
|
||||||
<a :href="objectLink" ref="objectLink">
|
<a :href="objectLink" ref="objectLink">
|
||||||
<div class="c-list-item__type-icon"
|
<div class="c-list-item__type-icon" :class="item.type.cssClass"></div>
|
||||||
:class="item.type.cssClass"></div>
|
<div class="c-list-item__name-value">{{item.model.name}}</div>
|
||||||
{{item.model.name}}
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="c-list-item__type">{{ item.type.name }}</td>
|
<td class="c-list-item__type">{{ item.type.name }}</td>
|
||||||
@@ -20,17 +19,24 @@
|
|||||||
|
|
||||||
/******************************* LIST ITEM */
|
/******************************* LIST ITEM */
|
||||||
.c-list-item {
|
.c-list-item {
|
||||||
&__name {
|
&__name a {
|
||||||
@include ellipsize();
|
display: flex;
|
||||||
|
|
||||||
|
> * + * { margin-left: $interiorMarginSm; }
|
||||||
}
|
}
|
||||||
|
|
||||||
&__type-icon {
|
&__type-icon {
|
||||||
|
// Have to do it this way instead of using icon-* class, due to need to apply alias to the icon
|
||||||
color: $colorKey;
|
color: $colorKey;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 1em;
|
width: 1em;
|
||||||
margin-right:$interiorMarginSm;
|
margin-right:$interiorMarginSm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__name-value {
|
||||||
|
@include ellipsize();
|
||||||
|
}
|
||||||
|
|
||||||
&.is-alias {
|
&.is-alias {
|
||||||
// Object is an alias to an original.
|
// Object is an alias to an original.
|
||||||
[class*='__type-icon'] {
|
[class*='__type-icon'] {
|
||||||
@@ -48,7 +54,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -78,9 +78,12 @@
|
|||||||
|
|
||||||
td {
|
td {
|
||||||
$p: floor($interiorMargin * 1.5);
|
$p: floor($interiorMargin * 1.5);
|
||||||
font-size: 1.1em;
|
@include ellipsize();
|
||||||
|
line-height: 120%; // Needed for icon alignment
|
||||||
|
max-width: 0;
|
||||||
padding-top: $p;
|
padding-top: $p;
|
||||||
padding-bottom: $p;
|
padding-bottom: $p;
|
||||||
|
width: 25%;
|
||||||
|
|
||||||
&:not(.c-list-item__name) {
|
&:not(.c-list-item__name) {
|
||||||
color: $colorItemFgDetails;
|
color: $colorItemFgDetails;
|
||||||
|
|||||||
@@ -5,21 +5,17 @@
|
|||||||
@input="search"
|
@input="search"
|
||||||
@clear="search">
|
@clear="search">
|
||||||
</search>
|
</search>
|
||||||
<div class="c-notebook__controls">
|
<div class="c-notebook__controls ">
|
||||||
<div class="select c-notebook__controls__time">
|
<select class="c-notebook__controls__time" v-model="showTime">
|
||||||
<select v-model="showTime">
|
<option value="0" selected="selected">Show all</option>
|
||||||
<option value="0" selected="selected">Show all</option>
|
<option value="1">Last hour</option>
|
||||||
<option value="1">Last hour</option>
|
<option value="8">Last 8 hours</option>
|
||||||
<option value="8">Last 8 hours</option>
|
<option value="24">Last 24 hours</option>
|
||||||
<option value="24">Last 24 hours</option>
|
</select>
|
||||||
</select>
|
<select class="c-notebook__controls__time" v-model="sortEntries">
|
||||||
</div>
|
<option value="newest" :selected="sortEntries === 'newest'">Newest first</option>
|
||||||
<div class="select c-notebook__controls__sort">
|
<option value="oldest" :selected="sortEntries === 'oldest'">Oldest first</option>
|
||||||
<select v-model="sortEntries">
|
</select>
|
||||||
<option value="newest" :selected="sortEntries === 'newest'">Newest first</option>
|
|
||||||
<option value="oldest" :selected="sortEntries === 'oldest'">Oldest first</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="c-notebook__drag-area icon-plus"
|
<div class="c-notebook__drag-area icon-plus"
|
||||||
|
|||||||
@@ -107,10 +107,10 @@ function (
|
|||||||
|
|
||||||
EntryController.prototype.dropOnEntry = function (entryid, event) {
|
EntryController.prototype.dropOnEntry = function (entryid, event) {
|
||||||
|
|
||||||
var data = event.dataTransfer.getData('domainObject');
|
var data = event.dataTransfer.getData('openmct/domain-object-path');
|
||||||
|
|
||||||
if (data) {
|
if (data) {
|
||||||
var selectedObject = JSON.parse(data),
|
var selectedObject = JSON.parse(data)[0],
|
||||||
selectedObjectId = selectedObject.identifier.key,
|
selectedObjectId = selectedObject.identifier.key,
|
||||||
cssClass = this.openmct.types.get(selectedObject.type),
|
cssClass = this.openmct.types.get(selectedObject.type),
|
||||||
entryPos = this.entryPosById(entryid),
|
entryPos = this.entryPosById(entryid),
|
||||||
|
|||||||
@@ -120,8 +120,8 @@ function (
|
|||||||
var date = Date.now(),
|
var date = Date.now(),
|
||||||
embed;
|
embed;
|
||||||
|
|
||||||
if (event.dataTransfer && event.dataTransfer.getData('domainObject')) {
|
if (event.dataTransfer && event.dataTransfer.getData('openmct/domain-object-path')) {
|
||||||
var selectedObject = JSON.parse(event.dataTransfer.getData('domainObject')),
|
var selectedObject = JSON.parse(event.dataTransfer.getData('openmct/domain-object-path'))[0],
|
||||||
selectedObjectId = selectedObject.identifier.key,
|
selectedObjectId = selectedObject.identifier.key,
|
||||||
cssClass = this.openmct.types.get(selectedObject.type);
|
cssClass = this.openmct.types.get(selectedObject.type);
|
||||||
|
|
||||||
|
|||||||
@@ -41,28 +41,24 @@
|
|||||||
<div class="grid-cell label"
|
<div class="grid-cell label"
|
||||||
title="The field to be plotted as a value for this series.">Value</div>
|
title="The field to be plotted as a value for this series.">Value</div>
|
||||||
<div class="grid-cell value">
|
<div class="grid-cell value">
|
||||||
<div class="select">
|
<select ng-model="form.yKey">
|
||||||
<select ng-model="form.yKey">
|
<option ng-repeat="option in yKeyOptions"
|
||||||
<option ng-repeat="option in yKeyOptions"
|
value="{{option.value}}"
|
||||||
value="{{option.value}}"
|
ng-selected="option.value == form.yKey">
|
||||||
ng-selected="option.value == form.yKey">
|
{{option.name}}
|
||||||
{{option.name}}
|
</option>
|
||||||
</option>
|
</select>
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="grid-row">
|
<li class="grid-row">
|
||||||
<div class="grid-cell label"
|
<div class="grid-cell label"
|
||||||
title="The line rendering style for this series.">Line Style</div>
|
title="The line rendering style for this series.">Line Style</div>
|
||||||
<div class="grid-cell value">
|
<div class="grid-cell value">
|
||||||
<div class="select">
|
<select ng-model="form.interpolate">
|
||||||
<select ng-model="form.interpolate">
|
<option value="none">None</option>
|
||||||
<option value="none">None</option>
|
<option value="linear">Linear interpolate</option>
|
||||||
<option value="linear">Linear interpolate</option>
|
<option value="stepAfter">Step after</option>
|
||||||
<option value="stepAfter">Step after</option>
|
</select>
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="grid-row">
|
<li class="grid-row">
|
||||||
@@ -160,15 +156,13 @@
|
|||||||
<div class="grid-cell label"
|
<div class="grid-cell label"
|
||||||
title="The position of the legend relative to the plot display area.">Position</div>
|
title="The position of the legend relative to the plot display area.">Position</div>
|
||||||
<div class="grid-cell value">
|
<div class="grid-cell value">
|
||||||
<div class="select">
|
<select ng-model="form.position">
|
||||||
<select ng-model="form.position">
|
<option value="hidden">Hidden</option>
|
||||||
<option value="hidden">Hidden</option>
|
<option value="top">Top</option>
|
||||||
<option value="top">Top</option>
|
<option value="right">Right</option>
|
||||||
<option value="right">Right</option>
|
<option value="bottom">Bottom</option>
|
||||||
<option value="bottom">Bottom</option>
|
<option value="left">Left</option>
|
||||||
<option value="left">Left</option>
|
</select>
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="grid-row">
|
<li class="grid-row">
|
||||||
@@ -180,15 +174,13 @@
|
|||||||
<div class="grid-cell label"
|
<div class="grid-cell label"
|
||||||
title="What to display in the legend when it's collapsed.">When collapsed show</div>
|
title="What to display in the legend when it's collapsed.">When collapsed show</div>
|
||||||
<div class="grid-cell value">
|
<div class="grid-cell value">
|
||||||
<div class="select">
|
<select ng-model="form.valueToShowWhenCollapsed">
|
||||||
<select ng-model="form.valueToShowWhenCollapsed">
|
<option value="none">Nothing</option>
|
||||||
<option value="none">nothing</option>
|
<option value="nearestTimestamp">Nearest timestamp</option>
|
||||||
<option value="nearestTimestamp">nearest timestamp</option>
|
<option value="nearestValue">Nearest value</option>
|
||||||
<option value="nearestValue">nearest Value</option>
|
<option value="min">Minimum value</option>
|
||||||
<option value="min">minimum value</option>
|
<option value="max">Maximum value</option>
|
||||||
<option value="max">maximum value</option>
|
</select>
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="grid-row">
|
<li class="grid-row">
|
||||||
|
|||||||
@@ -40,8 +40,7 @@ define([
|
|||||||
'./flexibleLayout/plugin',
|
'./flexibleLayout/plugin',
|
||||||
'./tabs/plugin',
|
'./tabs/plugin',
|
||||||
'../../platform/features/fixed/plugin',
|
'../../platform/features/fixed/plugin',
|
||||||
'./LADTable/plugin',
|
'./LADTable/plugin'
|
||||||
'./preview/plugin'
|
|
||||||
], function (
|
], function (
|
||||||
_,
|
_,
|
||||||
UTCTimeSystem,
|
UTCTimeSystem,
|
||||||
@@ -62,8 +61,7 @@ define([
|
|||||||
FlexibleLayout,
|
FlexibleLayout,
|
||||||
Tabs,
|
Tabs,
|
||||||
FixedView,
|
FixedView,
|
||||||
LADTable,
|
LADTable
|
||||||
PreviewPlugin
|
|
||||||
) {
|
) {
|
||||||
var bundleMap = {
|
var bundleMap = {
|
||||||
LocalStorage: 'platform/persistence/local',
|
LocalStorage: 'platform/persistence/local',
|
||||||
@@ -179,7 +177,6 @@ define([
|
|||||||
plugins.FixedView = FixedView;
|
plugins.FixedView = FixedView;
|
||||||
plugins.FlexibleLayout = FlexibleLayout;
|
plugins.FlexibleLayout = FlexibleLayout;
|
||||||
plugins.LADTable = LADTable;
|
plugins.LADTable = LADTable;
|
||||||
plugins.Preview = PreviewPlugin.default;
|
|
||||||
|
|
||||||
return plugins;
|
return plugins;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ export default {
|
|||||||
this.setCurrentTab = true;
|
this.setCurrentTab = true;
|
||||||
},
|
},
|
||||||
dragstart (e) {
|
dragstart (e) {
|
||||||
if (e.dataTransfer.getData('domainObject')) {
|
if (e.dataTransfer.types.includes('openmct/domain-object-path')) {
|
||||||
this.isDragging = true;
|
this.isDragging = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -79,8 +79,8 @@ define([
|
|||||||
|
|
||||||
loadComposition() {
|
loadComposition() {
|
||||||
this.tableComposition = this.openmct.composition.get(this.domainObject);
|
this.tableComposition = this.openmct.composition.get(this.domainObject);
|
||||||
if (this.tableComposition !== undefined){
|
if (this.tableComposition !== undefined) {
|
||||||
this.tableComposition.load().then((composition)=>{
|
this.tableComposition.load().then((composition) => {
|
||||||
composition = composition.filter(this.isTelemetryObject);
|
composition = composition.filter(this.isTelemetryObject);
|
||||||
|
|
||||||
this.configuration.addColumnsForAllObjects(composition);
|
this.configuration.addColumnsForAllObjects(composition);
|
||||||
@@ -122,7 +122,6 @@ define([
|
|||||||
|
|
||||||
let telemetryRows = telemetryData.map(datum => new TelemetryTableRow(datum, columnMap, keyString, limitEvaluator));
|
let telemetryRows = telemetryData.map(datum => new TelemetryTableRow(datum, columnMap, keyString, limitEvaluator));
|
||||||
this.boundedRows.add(telemetryRows);
|
this.boundedRows.add(telemetryRows);
|
||||||
console.log('Loaded %i rows', telemetryRows.length);
|
|
||||||
this.decrementOutstandingRequests();
|
this.decrementOutstandingRequests();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -131,7 +130,7 @@ define([
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
incrementOutstandingRequests() {
|
incrementOutstandingRequests() {
|
||||||
if (this.outstandingRequests === 0){
|
if (this.outstandingRequests === 0) {
|
||||||
this.emit('outstanding-requests', true);
|
this.emit('outstanding-requests', true);
|
||||||
}
|
}
|
||||||
this.outstandingRequests++;
|
this.outstandingRequests++;
|
||||||
@@ -143,7 +142,7 @@ define([
|
|||||||
decrementOutstandingRequests() {
|
decrementOutstandingRequests() {
|
||||||
this.outstandingRequests--;
|
this.outstandingRequests--;
|
||||||
|
|
||||||
if (this.outstandingRequests === 0){
|
if (this.outstandingRequests === 0) {
|
||||||
this.emit('outstanding-requests', false);
|
this.emit('outstanding-requests', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ define([
|
|||||||
objectMutated(object) {
|
objectMutated(object) {
|
||||||
//Synchronize domain object reference. Duplicate object otherwise change detection becomes impossible.
|
//Synchronize domain object reference. Duplicate object otherwise change detection becomes impossible.
|
||||||
this.domainObject = object;
|
this.domainObject = object;
|
||||||
|
//Was it the configuration that changed?
|
||||||
if (!_.eq(object.configuration, this.oldConfiguration)) {
|
if (!_.eq(object.configuration, this.oldConfiguration)) {
|
||||||
//Make copy of configuration, otherwise change detection is impossible if shared instance is being modified.
|
//Make copy of configuration, otherwise change detection is impossible if shared instance is being modified.
|
||||||
this.oldConfiguration = JSON.parse(JSON.stringify(this.getConfiguration()));
|
this.oldConfiguration = JSON.parse(JSON.stringify(this.getConfiguration()));
|
||||||
@@ -91,16 +92,19 @@ define([
|
|||||||
let columnsToRemove = this.columns[objectKeyString];
|
let columnsToRemove = this.columns[objectKeyString];
|
||||||
|
|
||||||
delete this.columns[objectKeyString];
|
delete this.columns[objectKeyString];
|
||||||
|
|
||||||
|
let configuration = this.domainObject.configuration;
|
||||||
|
let configurationChanged = false;
|
||||||
columnsToRemove.forEach((column) => {
|
columnsToRemove.forEach((column) => {
|
||||||
//There may be more than one column with the same key (eg. time system columns)
|
//There may be more than one column with the same key (eg. time system columns)
|
||||||
if (!this.hasColumnWithKey(column.getKey())) {
|
if (!this.hasColumnWithKey(column.getKey())) {
|
||||||
let configuration = this.domainObject.configuration;
|
|
||||||
delete configuration.hiddenColumns[column.getKey()];
|
delete configuration.hiddenColumns[column.getKey()];
|
||||||
// If there are no more columns with this key, delete any configuration, and trigger
|
configurationChanged = true;
|
||||||
// a column refresh.
|
|
||||||
this.openmct.objects.mutate(this.domainObject, 'configuration', configuration);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (configurationChanged) {
|
||||||
|
this.updateConfiguration(configuration);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
hasColumnWithKey(columnKey) {
|
hasColumnWithKey(columnKey) {
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
<div class="c-telemetry-table__headers-w js-table__headers-w" ref="headersTable" :style="{ 'max-width': widthWithScroll}">
|
<div class="c-telemetry-table__headers-w js-table__headers-w" ref="headersTable" :style="{ 'max-width': widthWithScroll}">
|
||||||
<table class="c-table__headers c-telemetry-table__headers">
|
<table class="c-table__headers c-telemetry-table__headers">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr class="c-telemetry-table__headers__name">
|
||||||
<table-column-header
|
<table-column-header
|
||||||
v-for="(title, key, headerIndex) in headers"
|
v-for="(title, key, headerIndex) in headers"
|
||||||
:key="key"
|
:key="key"
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
:sortOptions="sortOptions"
|
:sortOptions="sortOptions"
|
||||||
>{{title}}</table-column-header>
|
>{{title}}</table-column-header>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr class="c-telemetry-table__headers__filter">
|
||||||
<table-column-header
|
<table-column-header
|
||||||
v-for="(title, key, headerIndex) in headers"
|
v-for="(title, key, headerIndex) in headers"
|
||||||
:key="key"
|
:key="key"
|
||||||
@@ -110,8 +110,8 @@
|
|||||||
.c-telemetry-table__drop-target {
|
.c-telemetry-table__drop-target {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 2px;
|
width: 2px;
|
||||||
background-color: $editColor;
|
background-color: $editUIColor;
|
||||||
box-shadow: rgba($editColor, 0.5) 0 0 10px;
|
box-shadow: rgba($editUIColor, 0.5) 0 0 10px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
@@ -214,6 +214,22 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************* EDITING */
|
||||||
|
.is-editing {
|
||||||
|
.c-telemetry-table__headers__name {
|
||||||
|
th[draggable],
|
||||||
|
th[draggable] > * {
|
||||||
|
cursor: move;
|
||||||
|
}
|
||||||
|
|
||||||
|
th[draggable]:hover {
|
||||||
|
$b: $editFrameHovMovebarColorBg;
|
||||||
|
background: $b;
|
||||||
|
> * { background: $b; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/******************************* LEGACY */
|
/******************************* LEGACY */
|
||||||
.s-status-taking-snapshot,
|
.s-status-taking-snapshot,
|
||||||
.overlay.snapshot {
|
.overlay.snapshot {
|
||||||
|
|||||||
@@ -47,6 +47,14 @@ $bodyFont: $heroFont;
|
|||||||
@return linear-gradient(lighten($c, 5%), $c);
|
@return linear-gradient(lighten($c, 5%), $c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@function pullForward($val, $amt) {
|
||||||
|
@return lighten($val, $amt);
|
||||||
|
}
|
||||||
|
|
||||||
|
@function pushBack($val, $amt) {
|
||||||
|
@return darken($val, $amt);
|
||||||
|
}
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
$fontBaseSize: 12px;
|
$fontBaseSize: 12px;
|
||||||
$smallCr: 2px;
|
$smallCr: 2px;
|
||||||
@@ -55,7 +63,7 @@ $basicCr: 4px;
|
|||||||
|
|
||||||
// Base colors
|
// Base colors
|
||||||
$colorBodyBg: #393939;
|
$colorBodyBg: #393939;
|
||||||
$colorBodyFg: #aaa;
|
$colorBodyFg: #aaaaaa;
|
||||||
$colorBodyFgEm: #fff;
|
$colorBodyFgEm: #fff;
|
||||||
$colorGenBg: #222;
|
$colorGenBg: #222;
|
||||||
$colorHeadBg: #262626;
|
$colorHeadBg: #262626;
|
||||||
@@ -65,10 +73,11 @@ $colorStatusBarFg: $colorBodyFg;
|
|||||||
$colorStatusBarFgHov: #aaa;
|
$colorStatusBarFgHov: #aaa;
|
||||||
$colorKey: #0099cc;
|
$colorKey: #0099cc;
|
||||||
$colorKeyFg: #fff;
|
$colorKeyFg: #fff;
|
||||||
$colorKeyHov: #00c0f6;
|
$colorKeyHov: #26d8ff;
|
||||||
$colorKeyFilter: invert(36%) sepia(76%) saturate(2514%) hue-rotate(170deg) brightness(99%) contrast(101%);
|
$colorKeyFilter: invert(36%) sepia(76%) saturate(2514%) hue-rotate(170deg) brightness(99%) contrast(101%);
|
||||||
$colorKeyFilterHov: invert(63%) sepia(88%) saturate(3029%) hue-rotate(154deg) brightness(101%) contrast(100%);
|
$colorKeyFilterHov: invert(63%) sepia(88%) saturate(3029%) hue-rotate(154deg) brightness(101%) contrast(100%);
|
||||||
$colorKeySelectedBg: $colorKey;
|
$colorKeySelectedBg: $colorKey;
|
||||||
|
$uiColor: #00b2ff; // Resize bars, splitter bars, etc.
|
||||||
$colorInteriorBorder: rgba($colorBodyFg, 0.2);
|
$colorInteriorBorder: rgba($colorBodyFg, 0.2);
|
||||||
$colorA: #ccc;
|
$colorA: #ccc;
|
||||||
$colorAHov: #fff;
|
$colorAHov: #fff;
|
||||||
@@ -94,51 +103,52 @@ $colorPausedFg: #fff;
|
|||||||
$colorOk: #33cc33;
|
$colorOk: #33cc33;
|
||||||
|
|
||||||
// Base variations
|
// Base variations
|
||||||
$colorBodyBgSubtle: lighten($colorBodyBg, 5%);
|
$colorBodyBgSubtle: pullForward($colorBodyBg, 5%);
|
||||||
$colorBodyBgSubtleHov: darken($colorKey, 50%);
|
$colorBodyBgSubtleHov: pushBack($colorKey, 50%);
|
||||||
$colorKeySubtle: darken($colorKey, 10%);
|
$colorKeySubtle: pushBack($colorKey, 10%);
|
||||||
|
|
||||||
// Time Colors
|
// Time Colors
|
||||||
$colorTime: #618cff;
|
$colorTime: #618cff;
|
||||||
$colorTimeBg: $colorTime;
|
$colorTimeBg: $colorTime;
|
||||||
$colorTimeFg: lighten($colorTimeBg, 30%);
|
$colorTimeFg: pullForward($colorTimeBg, 30%);
|
||||||
$colorTimeHov: lighten($colorTime, 10%);
|
$colorTimeHov: pullForward($colorTime, 10%);
|
||||||
$colorTimeSubtle: darken($colorTime, 20%);
|
$colorTimeSubtle: pushBack($colorTime, 20%);
|
||||||
$colorTOI: $colorBodyFg; // was $timeControllerToiLineColor
|
$colorTOI: $colorBodyFg; // was $timeControllerToiLineColor
|
||||||
$colorTOIHov: $colorTime; // was $timeControllerToiLineColorHov
|
$colorTOIHov: $colorTime; // was $timeControllerToiLineColorHov
|
||||||
|
|
||||||
/************************************************** EDITING */
|
|
||||||
// Base Colors
|
|
||||||
$dlSpread: 20%;
|
|
||||||
$editColor: #00c7c3;
|
|
||||||
$editColorAlt: #9971ff;
|
|
||||||
$editColorBgBase: darken($editColor, $dlSpread);
|
|
||||||
$editColorBg: rgba($editColorBgBase, 0.2);
|
|
||||||
$editColorFg: lighten($editColor, $dlSpread);
|
|
||||||
$editColorHov: lighten($editColor, 20%);
|
|
||||||
// Canvas
|
|
||||||
$editCanvasColorBg: $editColorBg; //#002524;
|
|
||||||
$editCanvasColorGrid: rgba($editColorBgBase, 0.4); //lighten($editCanvasColorBg, 3%);
|
|
||||||
// Selectable
|
|
||||||
$editSelectableColor: #006563;
|
|
||||||
$editSelectableColorFg: lighten($editSelectableColor, 20%);
|
|
||||||
$editSelectableColorHov: lighten($editSelectableColor, 10%);
|
|
||||||
// Selectable selected
|
|
||||||
$editSelectableColorSelected: $editSelectableColorHov;
|
|
||||||
$editSelectableColorSelectedFg: lighten($editSelectableColorSelected, 30%);
|
|
||||||
$editSelectableColorFg: darken($editSelectableColor, 40%);
|
|
||||||
$editSelectableBorder: 1px dotted $editSelectableColor;
|
|
||||||
$editSelectableBorderHov: 1px dotted $editColorAlt;
|
|
||||||
$editSelectableBorderSelected: 1px solid $editColor;
|
|
||||||
$editSelectableShdwSelected: rgba($editColor, 0.75) 0 0 0 1px;
|
|
||||||
$editMoveableSelectedShdw: rgba($editColor, 0.5) 0 0 10px;
|
|
||||||
$editBorderDrilledIn: 1px dashed $editColorAlt;
|
|
||||||
$colorGridLines: rgba($editColor, 0.2);
|
|
||||||
|
|
||||||
/************************************************** BROWSING */
|
/************************************************** BROWSING */
|
||||||
$browseSelectableBorderHov: 1px dotted rgba($colorBodyFg, 0.2);
|
$browseFrameColor: pullForward($colorBodyBg, 10%);
|
||||||
$browseSelectableShdwHov: rgba($colorBodyFg, 0.2) 0 0 3px;
|
$browseFrameBorder: 1px solid $browseFrameColor; // Frames in Disp and Flex Layouts when frame is showing
|
||||||
$browseSelectedBorder: 1px solid rgba($colorBodyFg, 0.6);
|
$browseSelectableShdwHov: rgba($colorBodyFg, 0.3) 0 0 3px;
|
||||||
|
$browseSelectedBorder: 1px solid rgba($colorBodyFg, 0.4);
|
||||||
|
|
||||||
|
/************************************************** EDITING */
|
||||||
|
$editUIColor: $uiColor; // Base color
|
||||||
|
$editUIColorHov: pullForward(saturate($uiColor, 10%), 20%); // Hover color when $editUIColor is applied as a base color
|
||||||
|
$editUIBaseColor: #344b8d; // Base color, toolbar bg
|
||||||
|
$editUIBaseColorHov: pullForward($editUIBaseColor, 20%);
|
||||||
|
$editUIBaseColorFg: #ffffff; // Toolbar button icon colors, etc.
|
||||||
|
$editUIAreaBaseColor: pullForward(saturate($editUIBaseColor, 30%), 20%);
|
||||||
|
$editUIAreaShdw: $editUIAreaBaseColor 0 0 0 2px; // Edit area s-selected-parent
|
||||||
|
$editUIAreaShdwSelected: $editUIAreaBaseColor 0 0 0 3px; // Edit area s-selected
|
||||||
|
$editUIGridColorBg: rgba($editUIBaseColor, 0.2); // Background of layout editing area
|
||||||
|
$editUIGridColorFg: rgba(#000, 0.1); // Grid lines in layout editing area
|
||||||
|
$editFrameColor: $browseFrameColor; // Solid or dotted border applied to non-selected frames in a layout; move-bar on frame hover
|
||||||
|
$editFrameBorder: 1px dotted $editFrameColor;
|
||||||
|
$editFrameColorHov: $editUIColor; // Solid border hover on frames; hover should not be applied to selected objects
|
||||||
|
$editFrameBorderHov: 1px solid $editFrameColorHov; // Hover on selectable frames
|
||||||
|
$editFrameColorSelected: #ccc; // Border of selected frames
|
||||||
|
$editFrameColorHandleBg: $colorBodyBg; // Resize handle 'offset' color to make handle standout
|
||||||
|
$editFrameColorHandleFg: $editFrameColorSelected; // Resize handle main color
|
||||||
|
$editFrameSelectedShdw: rgba(black, 0.5) 0 1px 10px 1px;
|
||||||
|
$editFrameSelectedBorder: 1px dashed $editFrameColorSelected; // Selected frame element
|
||||||
|
$editFrameMovebarColorBg: $editFrameColor; // Movebar bg color
|
||||||
|
$editFrameMovebarColorFg: pullForward($editFrameMovebarColorBg, 20%); // Grippy lines, container size text
|
||||||
|
$editFrameHovMovebarColorBg: pullForward($editFrameMovebarColorBg, 10%); // Hover style
|
||||||
|
$editFrameHovMovebarColorFg: pullForward($editFrameMovebarColorFg, 10%);
|
||||||
|
$editFrameSelectedMovebarColorBg: pullForward($editFrameMovebarColorBg, 15%); // Selected style
|
||||||
|
$editFrameSelectedMovebarColorFg: pullForward($editFrameMovebarColorFg, 15%);
|
||||||
|
$editFrameMovebarH: 10px; // Height of move bar in layout frame
|
||||||
|
|
||||||
// Icons
|
// Icons
|
||||||
$colorIconAlias: #4af6f3;
|
$colorIconAlias: #4af6f3;
|
||||||
@@ -148,16 +158,16 @@ $colorIconAliasForKeyFilter: #aaa;
|
|||||||
$colorTabsHolderBg: rgba(black, 0.2);
|
$colorTabsHolderBg: rgba(black, 0.2);
|
||||||
|
|
||||||
// Buttons and Controls
|
// Buttons and Controls
|
||||||
$colorBtnBg: lighten($colorBodyBg, 10%);
|
$colorBtnBg: pullForward($colorBodyBg, 10%);
|
||||||
$colorBtnBgHov: lighten($colorBtnBg, 10%);
|
$colorBtnBgHov: pullForward($colorBtnBg, 10%);
|
||||||
$colorBtnFg: lighten($colorBodyFg, 10%);
|
$colorBtnFg: pullForward($colorBodyFg, 10%);
|
||||||
$colorBtnReverseFg: lighten($colorBtnFg, 10%);
|
$colorBtnReverseFg: pullForward($colorBtnFg, 10%);
|
||||||
$colorBtnReverseBg: lighten($colorBtnBg, 10%);
|
$colorBtnReverseBg: pullForward($colorBtnBg, 10%);
|
||||||
$colorBtnFgHov: $colorBtnFg;
|
$colorBtnFgHov: $colorBtnFg;
|
||||||
$colorBtnMajorBg: $colorKey;
|
$colorBtnMajorBg: $colorKey;
|
||||||
$colorBtnMajorBgHov: $colorKeyHov;
|
$colorBtnMajorBgHov: $colorKeyHov;
|
||||||
$colorBtnMajorFg: $colorKeyFg;
|
$colorBtnMajorFg: $colorKeyFg;
|
||||||
$colorBtnMajorFgHov: darken($colorBtnMajorFg, 10%);
|
$colorBtnMajorFgHov: pushBack($colorBtnMajorFg, 10%);
|
||||||
$colorBtnCautionBg: #f16f6f;
|
$colorBtnCautionBg: #f16f6f;
|
||||||
$colorBtnCautionBgHov: #f1504e;
|
$colorBtnCautionBgHov: #f1504e;
|
||||||
$colorBtnCautionFg: $colorBtnFg;
|
$colorBtnCautionFg: $colorBtnFg;
|
||||||
@@ -165,20 +175,20 @@ $colorClickIcon: $colorKey;
|
|||||||
$colorClickIconBgHov: rgba($colorKey, 0.6);
|
$colorClickIconBgHov: rgba($colorKey, 0.6);
|
||||||
$colorClickIconFgHov: $colorKeyHov;
|
$colorClickIconFgHov: $colorKeyHov;
|
||||||
$colorDropHint: $colorKey;
|
$colorDropHint: $colorKey;
|
||||||
$colorDropHintBg: darken($colorDropHint, 10%);
|
$colorDropHintBg: pushBack($colorDropHint, 10%);
|
||||||
$colorDropHintBgHov: $colorDropHint;
|
$colorDropHintBgHov: $colorDropHint;
|
||||||
$colorDropHintFg: lighten($colorDropHint, 40%);
|
$colorDropHintFg: pullForward($colorDropHint, 40%);
|
||||||
$colorDisclosureCtrl: rgba($colorBodyFg, 0.5);
|
$colorDisclosureCtrl: rgba($colorBodyFg, 0.5);
|
||||||
$colorDisclosureCtrlHov: rgba($colorBodyFg, 0.7);
|
$colorDisclosureCtrlHov: rgba($colorBodyFg, 0.7);
|
||||||
|
|
||||||
// Menus
|
// Menus
|
||||||
$colorMenuBg: lighten($colorBodyBg, 15%);
|
$colorMenuBg: pullForward($colorBodyBg, 15%);
|
||||||
$colorMenuFg: lighten($colorBodyFg, 30%);
|
$colorMenuFg: pullForward($colorBodyFg, 30%);
|
||||||
$colorMenuIc: lighten($colorKey, 15%);
|
$colorMenuIc: pullForward($colorKey, 15%);
|
||||||
$colorMenuHovBg: $colorMenuIc;
|
$colorMenuHovBg: $colorMenuIc;
|
||||||
$colorMenuHovFg: lighten($colorMenuFg, 10%);
|
$colorMenuHovFg: pullForward($colorMenuFg, 10%);
|
||||||
$colorMenuHovIc: $colorMenuHovFg;
|
$colorMenuHovIc: $colorMenuHovFg;
|
||||||
$colorMenuElementHilite: lighten($colorMenuBg, 10%);
|
$colorMenuElementHilite: pullForward($colorMenuBg, 10%);
|
||||||
$shdwMenu: rgba(black, 0.5) 0 1px 5px;
|
$shdwMenu: rgba(black, 0.5) 0 1px 5px;
|
||||||
$shdwMenuText: none;
|
$shdwMenuText: none;
|
||||||
$menuItemPad: $interiorMargin, floor($interiorMargin * 1.25);
|
$menuItemPad: $interiorMargin, floor($interiorMargin * 1.25);
|
||||||
@@ -200,21 +210,21 @@ $colorFormLines: rgba(#000, 0.1);
|
|||||||
$colorFormSectionHeader: rgba(#000, 0.05);
|
$colorFormSectionHeader: rgba(#000, 0.05);
|
||||||
$colorInputBg: rgba(black, 0.2);
|
$colorInputBg: rgba(black, 0.2);
|
||||||
$colorInputFg: $colorBodyFg;
|
$colorInputFg: $colorBodyFg;
|
||||||
$colorInputPlaceholder: darken($colorBodyFg, 20%);
|
$colorInputPlaceholder: pushBack($colorBodyFg, 20%);
|
||||||
$colorFormText: darken($colorBodyFg, 10%);
|
$colorFormText: pushBack($colorBodyFg, 10%);
|
||||||
$colorInputIcon: darken($colorBodyFg, 25%);
|
$colorInputIcon: pushBack($colorBodyFg, 25%);
|
||||||
$colorFieldHint: lighten($colorBodyFg, 40%);
|
$colorFieldHint: pullForward($colorBodyFg, 40%);
|
||||||
$shdwInput: inset rgba(black, 0.4) 0 0 1px;
|
$shdwInput: inset rgba(black, 0.4) 0 0 1px;
|
||||||
$shdwInputHov: inset rgba(black, 0.7) 0 0 2px;
|
$shdwInputHov: inset rgba(black, 0.7) 0 0 2px;
|
||||||
$shdwInputFoc: inset rgba(black, 0.8) 0 0.25px 3px;
|
$shdwInputFoc: inset rgba(black, 0.8) 0 0.25px 3px;
|
||||||
|
|
||||||
// Inspector
|
// Inspector
|
||||||
$colorInspectorBg: lighten($colorBodyBg, 5%);
|
$colorInspectorBg: pullForward($colorBodyBg, 5%);
|
||||||
$colorInspectorFg: $colorBodyFg;
|
$colorInspectorFg: $colorBodyFg;
|
||||||
$colorInspectorPropName: darken($colorBodyFg, 20%);
|
$colorInspectorPropName: pushBack($colorBodyFg, 20%);
|
||||||
$colorInspectorPropVal: lighten($colorInspectorFg, 15%);
|
$colorInspectorPropVal: pullForward($colorInspectorFg, 15%);
|
||||||
$colorInspectorSectionHeaderBg: lighten($colorInspectorBg, 5%);
|
$colorInspectorSectionHeaderBg: pullForward($colorInspectorBg, 5%);
|
||||||
$colorInspectorSectionHeaderFg: lighten($colorInspectorBg, 40%);
|
$colorInspectorSectionHeaderFg: pullForward($colorInspectorBg, 40%);
|
||||||
|
|
||||||
// Overlay
|
// Overlay
|
||||||
$overlayColorBg: $colorMenuBg;
|
$overlayColorBg: $colorMenuBg;
|
||||||
@@ -229,8 +239,8 @@ $colorIndicatorOn: $colorOk;
|
|||||||
$colorIndicatorOff: #777777;
|
$colorIndicatorOff: #777777;
|
||||||
|
|
||||||
// Staleness
|
// Staleness
|
||||||
$colorTelemFresh: lighten($colorBodyFg, 20%);
|
$colorTelemFresh: pullForward($colorBodyFg, 20%);
|
||||||
$colorTelemStale: darken($colorBodyFg, 20%);
|
$colorTelemStale: pushBack($colorBodyFg, 20%);
|
||||||
$styleTelemStale: italic;
|
$styleTelemStale: italic;
|
||||||
|
|
||||||
// Limits
|
// Limits
|
||||||
@@ -256,22 +266,22 @@ $colorInfoBubbleFg: #666;
|
|||||||
|
|
||||||
// Items
|
// Items
|
||||||
$colorItemBg: buttonBg($colorBtnBg);
|
$colorItemBg: buttonBg($colorBtnBg);
|
||||||
$colorItemBgHov: buttonBg(lighten($colorBtnBg, 5%));
|
$colorItemBgHov: buttonBg(pullForward($colorBtnBg, 5%));
|
||||||
$colorListItemBg: transparent;
|
$colorListItemBg: transparent;
|
||||||
$colorListItemBgHov: rgba($colorKey, 0.1);
|
$colorListItemBgHov: rgba($colorKey, 0.1);
|
||||||
$colorItemFg: $colorBtnFg;
|
$colorItemFg: $colorBtnFg;
|
||||||
$colorItemFgDetails: darken($colorItemFg, 20%);
|
$colorItemFgDetails: pushBack($colorItemFg, 20%);
|
||||||
$shdwItemText: none;
|
$shdwItemText: none;
|
||||||
|
|
||||||
// Tabular
|
// Tabular
|
||||||
$colorTabBorder: lighten($colorBodyBg, 10%);
|
$colorTabBorder: pullForward($colorBodyBg, 10%);
|
||||||
$colorTabBodyBg: $colorBodyBg;
|
$colorTabBodyBg: $colorBodyBg;
|
||||||
$colorTabBodyFg: lighten($colorBodyFg, 20%);
|
$colorTabBodyFg: pullForward($colorBodyFg, 20%);
|
||||||
$colorTabHeaderBg: lighten($colorBodyBg, 10%);
|
$colorTabHeaderBg: pullForward($colorBodyBg, 10%);
|
||||||
$colorTabHeaderFg: $colorBodyFg;
|
$colorTabHeaderFg: $colorBodyFg;
|
||||||
$colorTabHeaderBorder: $colorBodyBg;
|
$colorTabHeaderBorder: $colorBodyBg;
|
||||||
$colorTabGroupHeaderBg: lighten($colorBodyBg, 5%);
|
$colorTabGroupHeaderBg: pullForward($colorBodyBg, 5%);
|
||||||
$colorTabGroupHeaderFg: darken($colorTabHeaderFg, 10%);
|
$colorTabGroupHeaderFg: pushBack($colorTabHeaderFg, 10%);
|
||||||
|
|
||||||
// Plot
|
// Plot
|
||||||
$colorPlotBg: rgba(black, 0.05);
|
$colorPlotBg: rgba(black, 0.05);
|
||||||
@@ -280,22 +290,22 @@ $colorPlotHash: black;
|
|||||||
$opacityPlotHash: 0.2;
|
$opacityPlotHash: 0.2;
|
||||||
$stylePlotHash: dashed;
|
$stylePlotHash: dashed;
|
||||||
$colorPlotAreaBorder: $colorInteriorBorder;
|
$colorPlotAreaBorder: $colorInteriorBorder;
|
||||||
$colorPlotLabelFg: darken($colorPlotFg, 20%);
|
$colorPlotLabelFg: pushBack($colorPlotFg, 20%);
|
||||||
$legendHoverValueBg: rgba($colorBodyFg, 0.2);
|
$legendHoverValueBg: rgba($colorBodyFg, 0.2);
|
||||||
|
|
||||||
// Tree
|
// Tree
|
||||||
$colorTreeBg: transparent;
|
$colorTreeBg: transparent;
|
||||||
$colorItemTreeHoverBg: lighten($colorBodyBg, 10%);
|
$colorItemTreeHoverBg: pullForward($colorBodyBg, 10%);
|
||||||
$colorItemTreeHoverFg: lighten($colorBodyFg, 20%);
|
$colorItemTreeHoverFg: pullForward($colorBodyFg, 20%);
|
||||||
$colorItemTreeIcon: $colorKey; // Used
|
$colorItemTreeIcon: $colorKey; // Used
|
||||||
$colorItemTreeIconHover: $colorItemTreeIcon; // Used
|
$colorItemTreeIconHover: $colorItemTreeIcon; // Used
|
||||||
$colorItemTreeFg: $colorBodyFg;
|
$colorItemTreeFg: $colorBodyFg;
|
||||||
$colorItemTreeSelectedBg: darken($colorKey, 15%);
|
$colorItemTreeSelectedBg: pushBack($colorKey, 15%);
|
||||||
$colorItemTreeSelectedFg: $colorItemTreeHoverFg;
|
$colorItemTreeSelectedFg: $colorItemTreeHoverFg;
|
||||||
$colorItemTreeSelectedIcon: $colorItemTreeSelectedFg;
|
$colorItemTreeSelectedIcon: $colorItemTreeSelectedFg;
|
||||||
$colorItemTreeEditingBg: darken($editColor, 20%);
|
$colorItemTreeEditingBg: pushBack($editUIColor, 20%);
|
||||||
$colorItemTreeEditingFg: $editColorFg;
|
$colorItemTreeEditingFg: $editUIColor;
|
||||||
$colorItemTreeEditingIcon: $editColorFg;
|
$colorItemTreeEditingIcon: $editUIColor;
|
||||||
$colorItemTreeVC: $colorDisclosureCtrl;
|
$colorItemTreeVC: $colorDisclosureCtrl;
|
||||||
$colorItemTreeVCHover: $colorDisclosureCtrlHov;
|
$colorItemTreeVCHover: $colorDisclosureCtrlHov;
|
||||||
$shdwItemTreeIcon: none;
|
$shdwItemTreeIcon: none;
|
||||||
@@ -307,18 +317,18 @@ $colorThumbHoverBg: $colorItemTreeHoverBg;
|
|||||||
$scrollbarTrackSize: 7px;
|
$scrollbarTrackSize: 7px;
|
||||||
$scrollbarTrackShdw: rgba(#000, 0.2) 0 1px 2px;
|
$scrollbarTrackShdw: rgba(#000, 0.2) 0 1px 2px;
|
||||||
$scrollbarTrackColorBg: rgba(#000, 0.2);
|
$scrollbarTrackColorBg: rgba(#000, 0.2);
|
||||||
$scrollbarThumbColor: darken($colorBodyBg, 50%);
|
$scrollbarThumbColor: pushBack($colorBodyBg, 50%);
|
||||||
$scrollbarThumbColorHov: $colorKey;
|
$scrollbarThumbColorHov: $colorKey;
|
||||||
$scrollbarThumbColorMenu: lighten($colorMenuBg, 10%);
|
$scrollbarThumbColorMenu: pullForward($colorMenuBg, 10%);
|
||||||
$scrollbarThumbColorMenuHov: lighten($scrollbarThumbColorMenu, 2%);
|
$scrollbarThumbColorMenuHov: pullForward($scrollbarThumbColorMenu, 2%);
|
||||||
|
|
||||||
// Splitter
|
// Splitter
|
||||||
$splitterHandleD: 2px;
|
$splitterHandleD: 2px;
|
||||||
$splitterHandleHitMargin: 4px;
|
$splitterHandleHitMargin: 4px;
|
||||||
$colorSplitterBaseBg: $colorBodyBg;
|
$colorSplitterBaseBg: $colorBodyBg;
|
||||||
$colorSplitterBg: lighten($colorSplitterBaseBg, 10%);
|
$colorSplitterBg: pullForward($colorBodyBg, 10%);
|
||||||
$colorSplitterFg: $colorBodyBg;
|
$colorSplitterFg: $colorBodyBg;
|
||||||
$colorSplitterHover: $colorKey;
|
$colorSplitterHover: $uiColor;
|
||||||
$colorSplitterActive: $colorKey;
|
$colorSplitterActive: $colorKey;
|
||||||
$splitterBtnD: (16px, 35px); // height, width
|
$splitterBtnD: (16px, 35px); // height, width
|
||||||
$splitterBtnColorBg: $colorBtnBg;
|
$splitterBtnColorBg: $colorBtnBg;
|
||||||
@@ -330,7 +340,7 @@ $splitterCollapsedBtnColorBgHov: $colorKey;
|
|||||||
$splitterCollapsedBtnColorFgHov: $colorKeyFg;
|
$splitterCollapsedBtnColorFgHov: $colorKeyFg;
|
||||||
|
|
||||||
// Mobile
|
// Mobile
|
||||||
$colorMobilePaneLeft: darken($colorBodyBg, 2%);
|
$colorMobilePaneLeft: pushBack($colorBodyBg, 2%);
|
||||||
$colorMobilePaneLeftTreeItemBg: rgba($colorBodyFg, 0.1);
|
$colorMobilePaneLeftTreeItemBg: rgba($colorBodyFg, 0.1);
|
||||||
$colorMobilePaneLeftTreeItemFg: $colorItemTreeFg;
|
$colorMobilePaneLeftTreeItemFg: $colorItemTreeFg;
|
||||||
$colorMobileSelectListTreeItemBg: rgba(#000, 0.05);
|
$colorMobileSelectListTreeItemBg: rgba(#000, 0.05);
|
||||||
@@ -367,21 +377,10 @@ $createBtnTextTransform: uppercase;
|
|||||||
}
|
}
|
||||||
|
|
||||||
@mixin themedButton($c: $colorBtnBg) {
|
@mixin themedButton($c: $colorBtnBg) {
|
||||||
background: linear-gradient(lighten($c, 5%), $c);
|
background: linear-gradient(pullForward($c, 5%), $c);
|
||||||
box-shadow: rgba(black, 0.5) 0 0.5px 2px;
|
box-shadow: rgba(black, 0.5) 0 0.5px 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************************************** NOT USED, LEAVE FOR NOW */
|
@mixin themedSelect($bg: $colorBtnBg, $fg: $colorBtnFg) {
|
||||||
// Slider controls, not in use
|
@include cSelect(linear-gradient(lighten($bg, 5%), $bg), $fg, lighten($bg, 20%), rgba(black, 0.5) 0 0.5px 3px);
|
||||||
/*
|
}
|
||||||
$sliderColorBase: $colorKey;
|
|
||||||
$sliderColorRangeHolder: rgba(black, 0.07);
|
|
||||||
$sliderColorRange: rgba($sliderColorBase, 0.2);
|
|
||||||
$sliderColorRangeHov: rgba($sliderColorBase, 0.4);
|
|
||||||
$sliderColorKnob: darken($sliderColorBase, 20%);
|
|
||||||
$sliderColorKnobHov: rgba($sliderColorBase, 0.7);
|
|
||||||
$sliderColorRangeValHovBg: $sliderColorRange;
|
|
||||||
$sliderColorRangeValHovFg: $colorBodyFg;
|
|
||||||
$sliderKnobW: 15px;
|
|
||||||
$sliderKnobR: 2px;
|
|
||||||
*/
|
|
||||||
|
|||||||
@@ -51,6 +51,14 @@ $bodyFont: 'Chakra Petch', sans-serif;
|
|||||||
@return linear-gradient(lighten($c, 5%), $c);
|
@return linear-gradient(lighten($c, 5%), $c);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@function pullForward($val, $amt) {
|
||||||
|
@return lighten($val, $amt);
|
||||||
|
}
|
||||||
|
|
||||||
|
@function pushBack($val, $amt) {
|
||||||
|
@return darken($val, $amt);
|
||||||
|
}
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
$fontBaseSize: 12px;
|
$fontBaseSize: 12px;
|
||||||
$smallCr: 2px;
|
$smallCr: 2px;
|
||||||
@@ -69,10 +77,11 @@ $colorStatusBarFg: $colorBodyFg;
|
|||||||
$colorStatusBarFgHov: #aaa;
|
$colorStatusBarFgHov: #aaa;
|
||||||
$colorKey: #0099cc;
|
$colorKey: #0099cc;
|
||||||
$colorKeyFg: #fff;
|
$colorKeyFg: #fff;
|
||||||
$colorKeyHov: #00c0f6;
|
$colorKeyHov: #26d8ff;
|
||||||
$colorKeyFilter: invert(36%) sepia(76%) saturate(2514%) hue-rotate(170deg) brightness(99%) contrast(101%);
|
$colorKeyFilter: invert(36%) sepia(76%) saturate(2514%) hue-rotate(170deg) brightness(99%) contrast(101%);
|
||||||
$colorKeyFilterHov: invert(63%) sepia(88%) saturate(3029%) hue-rotate(154deg) brightness(101%) contrast(100%);
|
$colorKeyFilterHov: invert(63%) sepia(88%) saturate(3029%) hue-rotate(154deg) brightness(101%) contrast(100%);
|
||||||
$colorKeySelectedBg: $colorKey;
|
$colorKeySelectedBg: $colorKey;
|
||||||
|
$uiColor: #00b2ff; // Resize bars, splitter bars, etc.
|
||||||
$colorInteriorBorder: rgba($colorBodyFg, 0.2);
|
$colorInteriorBorder: rgba($colorBodyFg, 0.2);
|
||||||
$colorA: #ccc;
|
$colorA: #ccc;
|
||||||
$colorAHov: #fff;
|
$colorAHov: #fff;
|
||||||
@@ -98,51 +107,52 @@ $colorPausedFg: #fff;
|
|||||||
$colorOk: #33cc33;
|
$colorOk: #33cc33;
|
||||||
|
|
||||||
// Base variations
|
// Base variations
|
||||||
$colorBodyBgSubtle: lighten($colorBodyBg, 5%);
|
$colorBodyBgSubtle: pullForward($colorBodyBg, 5%);
|
||||||
$colorBodyBgSubtleHov: darken($colorKey, 50%);
|
$colorBodyBgSubtleHov: pushBack($colorKey, 50%);
|
||||||
$colorKeySubtle: darken($colorKey, 10%);
|
$colorKeySubtle: pushBack($colorKey, 10%);
|
||||||
|
|
||||||
// Time Colors
|
// Time Colors
|
||||||
$colorTime: #618cff;
|
$colorTime: #618cff;
|
||||||
$colorTimeBg: $colorTime;
|
$colorTimeBg: $colorTime;
|
||||||
$colorTimeFg: lighten($colorTimeBg, 30%);
|
$colorTimeFg: pullForward($colorTimeBg, 30%);
|
||||||
$colorTimeHov: lighten($colorTime, 10%);
|
$colorTimeHov: pullForward($colorTime, 10%);
|
||||||
$colorTimeSubtle: darken($colorTime, 20%);
|
$colorTimeSubtle: pushBack($colorTime, 20%);
|
||||||
$colorTOI: $colorBodyFg; // was $timeControllerToiLineColor
|
$colorTOI: $colorBodyFg; // was $timeControllerToiLineColor
|
||||||
$colorTOIHov: $colorTime; // was $timeControllerToiLineColorHov
|
$colorTOIHov: $colorTime; // was $timeControllerToiLineColorHov
|
||||||
|
|
||||||
/************************************************** EDITING */
|
|
||||||
// Base Colors
|
|
||||||
$dlSpread: 20%;
|
|
||||||
$editColor: #00c7c3;
|
|
||||||
$editColorAlt: #9971ff;
|
|
||||||
$editColorBgBase: darken($editColor, $dlSpread);
|
|
||||||
$editColorBg: rgba($editColorBgBase, 0.2);
|
|
||||||
$editColorFg: lighten($editColor, $dlSpread);
|
|
||||||
$editColorHov: lighten($editColor, 20%);
|
|
||||||
// Canvas
|
|
||||||
$editCanvasColorBg: $editColorBg; //#002524;
|
|
||||||
$editCanvasColorGrid: rgba($editColorBgBase, 0.4); //lighten($editCanvasColorBg, 3%);
|
|
||||||
// Selectable
|
|
||||||
$editSelectableColor: #006563;
|
|
||||||
$editSelectableColorFg: lighten($editSelectableColor, 20%);
|
|
||||||
$editSelectableColorHov: lighten($editSelectableColor, 10%);
|
|
||||||
// Selectable selected
|
|
||||||
$editSelectableColorSelected: $editSelectableColorHov;
|
|
||||||
$editSelectableColorSelectedFg: lighten($editSelectableColorSelected, 30%);
|
|
||||||
$editSelectableColorFg: darken($editSelectableColor, 40%);
|
|
||||||
$editSelectableBorder: 1px dotted $editSelectableColor;
|
|
||||||
$editSelectableBorderHov: 1px dotted $editColorAlt;
|
|
||||||
$editSelectableBorderSelected: 1px solid $editColor;
|
|
||||||
$editSelectableShdwSelected: rgba($editColor, 0.75) 0 0 0 1px;
|
|
||||||
$editMoveableSelectedShdw: rgba($editColor, 0.5) 0 0 10px;
|
|
||||||
$editBorderDrilledIn: 1px dashed $editColorAlt;
|
|
||||||
$colorGridLines: rgba($editColor, 0.2);
|
|
||||||
|
|
||||||
/************************************************** BROWSING */
|
/************************************************** BROWSING */
|
||||||
$browseSelectableBorderHov: 1px dotted rgba($colorBodyFg, 0.2);
|
$browseFrameColor: pullForward($colorBodyBg, 10%);
|
||||||
$browseSelectableShdwHov: rgba($colorBodyFg, 0.2) 0 0 3px;
|
$browseFrameBorder: 1px solid $browseFrameColor; // Frames in Disp and Flex Layouts when frame is showing
|
||||||
$browseSelectedBorder: 1px solid rgba($colorBodyFg, 0.6);
|
$browseSelectableShdwHov: rgba($colorBodyFg, 0.3) 0 0 3px;
|
||||||
|
$browseSelectedBorder: 1px solid rgba($colorBodyFg, 0.4);
|
||||||
|
|
||||||
|
/************************************************** EDITING */
|
||||||
|
$editUIColor: $uiColor; // Base color
|
||||||
|
$editUIColorHov: pullForward(saturate($uiColor, 10%), 20%); // Hover color when $editUIColor is applied as a base color
|
||||||
|
$editUIBaseColor: #344b8d; // Base color, toolbar bg
|
||||||
|
$editUIBaseColorHov: pullForward($editUIBaseColor, 20%);
|
||||||
|
$editUIBaseColorFg: #ffffff; // Toolbar button icon colors, etc.
|
||||||
|
$editUIAreaBaseColor: pullForward(saturate($editUIBaseColor, 30%), 20%);
|
||||||
|
$editUIAreaShdw: $editUIAreaBaseColor 0 0 0 2px; // Edit area s-selected-parent
|
||||||
|
$editUIAreaShdwSelected: $editUIAreaBaseColor 0 0 0 3px; // Edit area s-selected
|
||||||
|
$editUIGridColorBg: rgba($editUIBaseColor, 0.2); // Background of layout editing area
|
||||||
|
$editUIGridColorFg: rgba(#000, 0.1); // Grid lines in layout editing area
|
||||||
|
$editFrameColor: $browseFrameColor; // Solid or dotted border applied to non-selected frames in a layout; move-bar on frame hover
|
||||||
|
$editFrameBorder: 1px dotted $editFrameColor;
|
||||||
|
$editFrameColorHov: $editUIColor; // Solid border hover on frames; hover should not be applied to selected objects
|
||||||
|
$editFrameBorderHov: 1px solid $editFrameColorHov; // Hover on selectable frames
|
||||||
|
$editFrameColorSelected: #ccc; // Border of selected frames
|
||||||
|
$editFrameColorHandleBg: $colorBodyBg; // Resize handle 'offset' color to make handle standout
|
||||||
|
$editFrameColorHandleFg: $editFrameColorSelected; // Resize handle main color
|
||||||
|
$editFrameSelectedShdw: rgba(black, 0.5) 0 1px 10px 1px;
|
||||||
|
$editFrameSelectedBorder: 1px dashed $editFrameColorSelected; // Selected frame element
|
||||||
|
$editFrameMovebarColorBg: $editFrameColor; // Movebar bg color
|
||||||
|
$editFrameMovebarColorFg: pullForward($editFrameMovebarColorBg, 20%); // Grippy lines, container size text
|
||||||
|
$editFrameHovMovebarColorBg: pullForward($editFrameMovebarColorBg, 10%); // Hover style
|
||||||
|
$editFrameHovMovebarColorFg: pullForward($editFrameMovebarColorFg, 10%);
|
||||||
|
$editFrameSelectedMovebarColorBg: pullForward($editFrameMovebarColorBg, 15%); // Selected style
|
||||||
|
$editFrameSelectedMovebarColorFg: pullForward($editFrameMovebarColorFg, 15%);
|
||||||
|
$editFrameMovebarH: 10px; // Height of move bar in layout frame
|
||||||
|
|
||||||
// Icons
|
// Icons
|
||||||
$colorIconAlias: #4af6f3;
|
$colorIconAlias: #4af6f3;
|
||||||
@@ -152,16 +162,16 @@ $colorIconAliasForKeyFilter: #aaa;
|
|||||||
$colorTabsHolderBg: rgba(black, 0.2);
|
$colorTabsHolderBg: rgba(black, 0.2);
|
||||||
|
|
||||||
// Buttons and Controls
|
// Buttons and Controls
|
||||||
$colorBtnBg: lighten($colorBodyBg, 10%);
|
$colorBtnBg: pullForward($colorBodyBg, 10%);
|
||||||
$colorBtnBgHov: lighten($colorBtnBg, 10%);
|
$colorBtnBgHov: pullForward($colorBtnBg, 10%);
|
||||||
$colorBtnFg: lighten($colorBodyFg, 10%);
|
$colorBtnFg: pullForward($colorBodyFg, 10%);
|
||||||
$colorBtnReverseFg: lighten($colorBtnFg, 10%);
|
$colorBtnReverseFg: pullForward($colorBtnFg, 10%);
|
||||||
$colorBtnReverseBg: lighten($colorBtnBg, 10%);
|
$colorBtnReverseBg: pullForward($colorBtnBg, 10%);
|
||||||
$colorBtnFgHov: $colorBtnFg;
|
$colorBtnFgHov: $colorBtnFg;
|
||||||
$colorBtnMajorBg: $colorKey;
|
$colorBtnMajorBg: $colorKey;
|
||||||
$colorBtnMajorBgHov: $colorKeyHov;
|
$colorBtnMajorBgHov: $colorKeyHov;
|
||||||
$colorBtnMajorFg: $colorKeyFg;
|
$colorBtnMajorFg: $colorKeyFg;
|
||||||
$colorBtnMajorFgHov: darken($colorBtnMajorFg, 10%);
|
$colorBtnMajorFgHov: pushBack($colorBtnMajorFg, 10%);
|
||||||
$colorBtnCautionBg: #f16f6f;
|
$colorBtnCautionBg: #f16f6f;
|
||||||
$colorBtnCautionBgHov: #f1504e;
|
$colorBtnCautionBgHov: #f1504e;
|
||||||
$colorBtnCautionFg: $colorBtnFg;
|
$colorBtnCautionFg: $colorBtnFg;
|
||||||
@@ -169,20 +179,20 @@ $colorClickIcon: $colorKey;
|
|||||||
$colorClickIconBgHov: rgba($colorKey, 0.6);
|
$colorClickIconBgHov: rgba($colorKey, 0.6);
|
||||||
$colorClickIconFgHov: $colorKeyHov;
|
$colorClickIconFgHov: $colorKeyHov;
|
||||||
$colorDropHint: $colorKey;
|
$colorDropHint: $colorKey;
|
||||||
$colorDropHintBg: darken($colorDropHint, 10%);
|
$colorDropHintBg: pushBack($colorDropHint, 10%);
|
||||||
$colorDropHintBgHov: $colorDropHint;
|
$colorDropHintBgHov: $colorDropHint;
|
||||||
$colorDropHintFg: lighten($colorDropHint, 40%);
|
$colorDropHintFg: pullForward($colorDropHint, 40%);
|
||||||
$colorDisclosureCtrl: rgba($colorBodyFg, 0.5);
|
$colorDisclosureCtrl: rgba($colorBodyFg, 0.5);
|
||||||
$colorDisclosureCtrlHov: rgba($colorBodyFg, 0.7);
|
$colorDisclosureCtrlHov: rgba($colorBodyFg, 0.7);
|
||||||
|
|
||||||
// Menus
|
// Menus
|
||||||
$colorMenuBg: lighten($colorBodyBg, 15%);
|
$colorMenuBg: pullForward($colorBodyBg, 15%);
|
||||||
$colorMenuFg: lighten($colorBodyFg, 30%);
|
$colorMenuFg: pullForward($colorBodyFg, 30%);
|
||||||
$colorMenuIc: lighten($colorKey, 15%);
|
$colorMenuIc: pullForward($colorKey, 15%);
|
||||||
$colorMenuHovBg: $colorMenuIc;
|
$colorMenuHovBg: $colorMenuIc;
|
||||||
$colorMenuHovFg: lighten($colorMenuFg, 10%);
|
$colorMenuHovFg: pullForward($colorMenuFg, 10%);
|
||||||
$colorMenuHovIc: $colorMenuHovFg;
|
$colorMenuHovIc: $colorMenuHovFg;
|
||||||
$colorMenuElementHilite: lighten($colorMenuBg, 10%);
|
$colorMenuElementHilite: pullForward($colorMenuBg, 10%);
|
||||||
$shdwMenu: rgba(black, 0.5) 0 1px 5px;
|
$shdwMenu: rgba(black, 0.5) 0 1px 5px;
|
||||||
$shdwMenuText: none;
|
$shdwMenuText: none;
|
||||||
$menuItemPad: $interiorMargin, floor($interiorMargin * 1.25);
|
$menuItemPad: $interiorMargin, floor($interiorMargin * 1.25);
|
||||||
@@ -204,21 +214,21 @@ $colorFormLines: rgba(#000, 0.1);
|
|||||||
$colorFormSectionHeader: rgba(#000, 0.05);
|
$colorFormSectionHeader: rgba(#000, 0.05);
|
||||||
$colorInputBg: rgba(black, 0.2);
|
$colorInputBg: rgba(black, 0.2);
|
||||||
$colorInputFg: $colorBodyFg;
|
$colorInputFg: $colorBodyFg;
|
||||||
$colorInputPlaceholder: darken($colorBodyFg, 20%);
|
$colorInputPlaceholder: pushBack($colorBodyFg, 20%);
|
||||||
$colorFormText: darken($colorBodyFg, 10%);
|
$colorFormText: pushBack($colorBodyFg, 10%);
|
||||||
$colorInputIcon: darken($colorBodyFg, 25%);
|
$colorInputIcon: pushBack($colorBodyFg, 25%);
|
||||||
$colorFieldHint: lighten($colorBodyFg, 40%);
|
$colorFieldHint: pullForward($colorBodyFg, 40%);
|
||||||
$shdwInput: inset rgba(black, 0.4) 0 0 1px;
|
$shdwInput: inset rgba(black, 0.4) 0 0 1px;
|
||||||
$shdwInputHov: inset rgba(black, 0.7) 0 0 2px;
|
$shdwInputHov: inset rgba(black, 0.7) 0 0 2px;
|
||||||
$shdwInputFoc: inset rgba(black, 0.8) 0 0.25px 3px;
|
$shdwInputFoc: inset rgba(black, 0.8) 0 0.25px 3px;
|
||||||
|
|
||||||
// Inspector
|
// Inspector
|
||||||
$colorInspectorBg: lighten($colorBodyBg, 5%);
|
$colorInspectorBg: pullForward($colorBodyBg, 5%);
|
||||||
$colorInspectorFg: $colorBodyFg;
|
$colorInspectorFg: $colorBodyFg;
|
||||||
$colorInspectorPropName: darken($colorBodyFg, 20%);
|
$colorInspectorPropName: pushBack($colorBodyFg, 20%);
|
||||||
$colorInspectorPropVal: lighten($colorInspectorFg, 15%);
|
$colorInspectorPropVal: pullForward($colorInspectorFg, 15%);
|
||||||
$colorInspectorSectionHeaderBg: lighten($colorInspectorBg, 5%);
|
$colorInspectorSectionHeaderBg: pullForward($colorInspectorBg, 5%);
|
||||||
$colorInspectorSectionHeaderFg: lighten($colorInspectorBg, 40%);
|
$colorInspectorSectionHeaderFg: pullForward($colorInspectorBg, 40%);
|
||||||
|
|
||||||
// Overlay
|
// Overlay
|
||||||
$overlayColorBg: $colorMenuBg;
|
$overlayColorBg: $colorMenuBg;
|
||||||
@@ -233,8 +243,8 @@ $colorIndicatorOn: $colorOk;
|
|||||||
$colorIndicatorOff: #777777;
|
$colorIndicatorOff: #777777;
|
||||||
|
|
||||||
// Staleness
|
// Staleness
|
||||||
$colorTelemFresh: lighten($colorBodyFg, 20%);
|
$colorTelemFresh: pullForward($colorBodyFg, 20%);
|
||||||
$colorTelemStale: darken($colorBodyFg, 20%);
|
$colorTelemStale: pushBack($colorBodyFg, 20%);
|
||||||
$styleTelemStale: italic;
|
$styleTelemStale: italic;
|
||||||
|
|
||||||
// Limits
|
// Limits
|
||||||
@@ -260,22 +270,22 @@ $colorInfoBubbleFg: #666;
|
|||||||
|
|
||||||
// Items
|
// Items
|
||||||
$colorItemBg: buttonBg($colorBtnBg);
|
$colorItemBg: buttonBg($colorBtnBg);
|
||||||
$colorItemBgHov: buttonBg(lighten($colorBtnBg, 5%));
|
$colorItemBgHov: buttonBg(pullForward($colorBtnBg, 5%));
|
||||||
$colorListItemBg: transparent;
|
$colorListItemBg: transparent;
|
||||||
$colorListItemBgHov: rgba($colorKey, 0.1);
|
$colorListItemBgHov: rgba($colorKey, 0.1);
|
||||||
$colorItemFg: $colorBtnFg;
|
$colorItemFg: $colorBtnFg;
|
||||||
$colorItemFgDetails: darken($colorItemFg, 20%);
|
$colorItemFgDetails: pushBack($colorItemFg, 20%);
|
||||||
$shdwItemText: none;
|
$shdwItemText: none;
|
||||||
|
|
||||||
// Tabular
|
// Tabular
|
||||||
$colorTabBorder: lighten($colorBodyBg, 10%);
|
$colorTabBorder: pullForward($colorBodyBg, 10%);
|
||||||
$colorTabBodyBg: $colorBodyBg;
|
$colorTabBodyBg: $colorBodyBg;
|
||||||
$colorTabBodyFg: lighten($colorBodyFg, 20%);
|
$colorTabBodyFg: pullForward($colorBodyFg, 20%);
|
||||||
$colorTabHeaderBg: lighten($colorBodyBg, 10%);
|
$colorTabHeaderBg: pullForward($colorBodyBg, 10%);
|
||||||
$colorTabHeaderFg: $colorBodyFg;
|
$colorTabHeaderFg: $colorBodyFg;
|
||||||
$colorTabHeaderBorder: $colorBodyBg;
|
$colorTabHeaderBorder: $colorBodyBg;
|
||||||
$colorTabGroupHeaderBg: lighten($colorBodyBg, 5%);
|
$colorTabGroupHeaderBg: pullForward($colorBodyBg, 5%);
|
||||||
$colorTabGroupHeaderFg: darken($colorTabHeaderFg, 10%);
|
$colorTabGroupHeaderFg: pushBack($colorTabHeaderFg, 10%);
|
||||||
|
|
||||||
// Plot
|
// Plot
|
||||||
$colorPlotBg: rgba(black, 0.05);
|
$colorPlotBg: rgba(black, 0.05);
|
||||||
@@ -284,22 +294,22 @@ $colorPlotHash: black;
|
|||||||
$opacityPlotHash: 0.2;
|
$opacityPlotHash: 0.2;
|
||||||
$stylePlotHash: dashed;
|
$stylePlotHash: dashed;
|
||||||
$colorPlotAreaBorder: $colorInteriorBorder;
|
$colorPlotAreaBorder: $colorInteriorBorder;
|
||||||
$colorPlotLabelFg: darken($colorPlotFg, 20%);
|
$colorPlotLabelFg: pushBack($colorPlotFg, 20%);
|
||||||
$legendHoverValueBg: rgba($colorBodyFg, 0.2);
|
$legendHoverValueBg: rgba($colorBodyFg, 0.2);
|
||||||
|
|
||||||
// Tree
|
// Tree
|
||||||
$colorTreeBg: transparent;
|
$colorTreeBg: transparent;
|
||||||
$colorItemTreeHoverBg: lighten($colorBodyBg, 10%);
|
$colorItemTreeHoverBg: pullForward($colorBodyBg, 10%);
|
||||||
$colorItemTreeHoverFg: lighten($colorBodyFg, 20%);
|
$colorItemTreeHoverFg: pullForward($colorBodyFg, 20%);
|
||||||
$colorItemTreeIcon: $colorKey; // Used
|
$colorItemTreeIcon: $colorKey; // Used
|
||||||
$colorItemTreeIconHover: $colorItemTreeIcon; // Used
|
$colorItemTreeIconHover: $colorItemTreeIcon; // Used
|
||||||
$colorItemTreeFg: $colorBodyFg;
|
$colorItemTreeFg: $colorBodyFg;
|
||||||
$colorItemTreeSelectedBg: darken($colorKey, 15%);
|
$colorItemTreeSelectedBg: pushBack($colorKey, 15%);
|
||||||
$colorItemTreeSelectedFg: $colorItemTreeHoverFg;
|
$colorItemTreeSelectedFg: $colorItemTreeHoverFg;
|
||||||
$colorItemTreeSelectedIcon: $colorItemTreeSelectedFg;
|
$colorItemTreeSelectedIcon: $colorItemTreeSelectedFg;
|
||||||
$colorItemTreeEditingBg: darken($editColor, 20%);
|
$colorItemTreeEditingBg: pushBack($editUIColor, 20%);
|
||||||
$colorItemTreeEditingFg: $editColorFg;
|
$colorItemTreeEditingFg: $editUIColor;
|
||||||
$colorItemTreeEditingIcon: $editColorFg;
|
$colorItemTreeEditingIcon: $editUIColor;
|
||||||
$colorItemTreeVC: $colorDisclosureCtrl;
|
$colorItemTreeVC: $colorDisclosureCtrl;
|
||||||
$colorItemTreeVCHover: $colorDisclosureCtrlHov;
|
$colorItemTreeVCHover: $colorDisclosureCtrlHov;
|
||||||
$shdwItemTreeIcon: none;
|
$shdwItemTreeIcon: none;
|
||||||
@@ -311,18 +321,18 @@ $colorThumbHoverBg: $colorItemTreeHoverBg;
|
|||||||
$scrollbarTrackSize: 7px;
|
$scrollbarTrackSize: 7px;
|
||||||
$scrollbarTrackShdw: rgba(#000, 0.2) 0 1px 2px;
|
$scrollbarTrackShdw: rgba(#000, 0.2) 0 1px 2px;
|
||||||
$scrollbarTrackColorBg: rgba(#000, 0.2);
|
$scrollbarTrackColorBg: rgba(#000, 0.2);
|
||||||
$scrollbarThumbColor: darken($colorBodyBg, 50%);
|
$scrollbarThumbColor: pushBack($colorBodyBg, 50%);
|
||||||
$scrollbarThumbColorHov: $colorKey;
|
$scrollbarThumbColorHov: $colorKey;
|
||||||
$scrollbarThumbColorMenu: lighten($colorMenuBg, 10%);
|
$scrollbarThumbColorMenu: pullForward($colorMenuBg, 10%);
|
||||||
$scrollbarThumbColorMenuHov: lighten($scrollbarThumbColorMenu, 2%);
|
$scrollbarThumbColorMenuHov: pullForward($scrollbarThumbColorMenu, 2%);
|
||||||
|
|
||||||
// Splitter
|
// Splitter
|
||||||
$splitterHandleD: 2px;
|
$splitterHandleD: 2px;
|
||||||
$splitterHandleHitMargin: 4px;
|
$splitterHandleHitMargin: 4px;
|
||||||
$colorSplitterBaseBg: $colorBodyBg;
|
$colorSplitterBaseBg: $colorBodyBg;
|
||||||
$colorSplitterBg: lighten($colorSplitterBaseBg, 10%);
|
$colorSplitterBg: pullForward($colorBodyBg, 10%);
|
||||||
$colorSplitterFg: $colorBodyBg;
|
$colorSplitterFg: $colorBodyBg;
|
||||||
$colorSplitterHover: $colorKey;
|
$colorSplitterHover: $uiColor;
|
||||||
$colorSplitterActive: $colorKey;
|
$colorSplitterActive: $colorKey;
|
||||||
$splitterBtnD: (16px, 35px); // height, width
|
$splitterBtnD: (16px, 35px); // height, width
|
||||||
$splitterBtnColorBg: $colorBtnBg;
|
$splitterBtnColorBg: $colorBtnBg;
|
||||||
@@ -334,7 +344,7 @@ $splitterCollapsedBtnColorBgHov: $colorKey;
|
|||||||
$splitterCollapsedBtnColorFgHov: $colorKeyFg;
|
$splitterCollapsedBtnColorFgHov: $colorKeyFg;
|
||||||
|
|
||||||
// Mobile
|
// Mobile
|
||||||
$colorMobilePaneLeft: darken($colorBodyBg, 2%);
|
$colorMobilePaneLeft: pushBack($colorBodyBg, 2%);
|
||||||
$colorMobilePaneLeftTreeItemBg: rgba($colorBodyFg, 0.1);
|
$colorMobilePaneLeftTreeItemBg: rgba($colorBodyFg, 0.1);
|
||||||
$colorMobilePaneLeftTreeItemFg: $colorItemTreeFg;
|
$colorMobilePaneLeftTreeItemFg: $colorItemTreeFg;
|
||||||
$colorMobileSelectListTreeItemBg: rgba(#000, 0.05);
|
$colorMobileSelectListTreeItemBg: rgba(#000, 0.05);
|
||||||
@@ -371,10 +381,14 @@ $createBtnTextTransform: uppercase;
|
|||||||
}
|
}
|
||||||
|
|
||||||
@mixin themedButton($c: $colorBtnBg) {
|
@mixin themedButton($c: $colorBtnBg) {
|
||||||
background: linear-gradient(lighten($c, 5%), $c);
|
background: linear-gradient(pullForward($c, 5%), $c);
|
||||||
box-shadow: rgba(black, 0.5) 0 0.5px 2px;
|
box-shadow: rgba(black, 0.5) 0 0.5px 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin themedSelect($bg: $colorBtnBg, $fg: $colorBtnFg) {
|
||||||
|
@include cSelect(linear-gradient(lighten($bg, 5%), $bg), $fg, lighten($bg, 20%), rgba(black, 0.5) 0 0.5px 3px);
|
||||||
|
}
|
||||||
|
|
||||||
/**************************************************** OVERRIDES */
|
/**************************************************** OVERRIDES */
|
||||||
.c-frame {
|
.c-frame {
|
||||||
&:not(.no-frame) {
|
&:not(.no-frame) {
|
||||||
|
|||||||
@@ -47,6 +47,14 @@ $bodyFont: $heroFont;
|
|||||||
@return $c;
|
@return $c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@function pullForward($val, $amt) {
|
||||||
|
@return darken($val, $amt);
|
||||||
|
}
|
||||||
|
|
||||||
|
@function pushBack($val, $amt) {
|
||||||
|
@return lighten($val, $amt);
|
||||||
|
}
|
||||||
|
|
||||||
// Constants
|
// Constants
|
||||||
$fontBaseSize: 12px;
|
$fontBaseSize: 12px;
|
||||||
$smallCr: 2px;
|
$smallCr: 2px;
|
||||||
@@ -69,6 +77,7 @@ $colorKeyHov: #00c0f6;
|
|||||||
$colorKeyFilter: invert(37%) sepia(100%) saturate(686%) hue-rotate(157deg) brightness(102%) contrast(102%);
|
$colorKeyFilter: invert(37%) sepia(100%) saturate(686%) hue-rotate(157deg) brightness(102%) contrast(102%);
|
||||||
$colorKeyFilterHov: invert(69%) sepia(87%) saturate(3243%) hue-rotate(151deg) brightness(97%) contrast(102%);
|
$colorKeyFilterHov: invert(69%) sepia(87%) saturate(3243%) hue-rotate(151deg) brightness(97%) contrast(102%);
|
||||||
$colorKeySelectedBg: $colorKey;
|
$colorKeySelectedBg: $colorKey;
|
||||||
|
$uiColor: #289fec; // Resize bars, splitter bars, etc.
|
||||||
$colorInteriorBorder: rgba($colorBodyFg, 0.2);
|
$colorInteriorBorder: rgba($colorBodyFg, 0.2);
|
||||||
$colorA: #999;
|
$colorA: #999;
|
||||||
$colorAHov: $colorKey;
|
$colorAHov: $colorKey;
|
||||||
@@ -94,51 +103,52 @@ $colorPausedFg: #fff;
|
|||||||
$colorOk: #33cc33;
|
$colorOk: #33cc33;
|
||||||
|
|
||||||
// Base variations
|
// Base variations
|
||||||
$colorBodyBgSubtle: darken($colorBodyBg, 5%);
|
$colorBodyBgSubtle: pullForward($colorBodyBg, 5%);
|
||||||
$colorBodyBgSubtleHov: lighten($colorKey, 50%);
|
$colorBodyBgSubtleHov: pushBack($colorKey, 50%);
|
||||||
$colorKeySubtle: lighten($colorKey, 50%);
|
$colorKeySubtle: pushBack($colorKey, 10%);
|
||||||
|
|
||||||
// Time Colors
|
// Time Colors
|
||||||
$colorTime: #618cff;
|
$colorTime: #618cff;
|
||||||
$colorTimeBg: $colorTime;
|
$colorTimeBg: $colorTime;
|
||||||
$colorTimeFg: $colorBodyBg;
|
$colorTimeFg: $colorBodyBg;
|
||||||
$colorTimeHov: lighten($colorTime, 5%);
|
$colorTimeHov: pushBack($colorTime, 5%);
|
||||||
$colorTimeSubtle: lighten($colorTime, 20%);
|
$colorTimeSubtle: pushBack($colorTime, 20%);
|
||||||
$colorTOI: $colorBodyFg; // was $timeControllerToiLineColor
|
$colorTOI: $colorBodyFg; // was $timeControllerToiLineColor
|
||||||
$colorTOIHov: $colorTime; // was $timeControllerToiLineColorHov
|
$colorTOIHov: $colorTime; // was $timeControllerToiLineColorHov
|
||||||
|
|
||||||
/************************************************** EDITING */
|
|
||||||
// Base Colors
|
|
||||||
$dlSpread: 20%;
|
|
||||||
$editColor: #00c7c3;
|
|
||||||
$editColorAlt: #9971ff;
|
|
||||||
$editColorBgBase: darken($editColor, $dlSpread);
|
|
||||||
$editColorBg: darken($editColor, $dlSpread);
|
|
||||||
$editColorFg: lighten($editColor, $dlSpread);
|
|
||||||
$editColorHov: lighten($editColor, 20%);
|
|
||||||
// Canvas
|
|
||||||
$editCanvasColorBg: #e6ffff;
|
|
||||||
$editCanvasColorGrid: darken($editCanvasColorBg, 10%);
|
|
||||||
// Selectable
|
|
||||||
$editSelectableColor: #acdad6;
|
|
||||||
$editSelectableColorFg: darken($editSelectableColor, 20%);
|
|
||||||
$editSelectableColorHov: darken($editSelectableColor, 10%);
|
|
||||||
// Selectable selected
|
|
||||||
$editSelectableColorSelected: $editColor;
|
|
||||||
$editSelectableColorSelectedFg: lighten($editSelectableColorSelected, 50%);
|
|
||||||
$editSelectableColorFg: darken($editSelectableColor, 40%);
|
|
||||||
$editSelectableBorder: 1px dotted $editSelectableColor;
|
|
||||||
$editSelectableBorderHov: 1px dotted $editColorAlt;
|
|
||||||
$editSelectableBorderSelected: 1px solid $editColor;
|
|
||||||
$editSelectableShdwSelected: rgba($editColor, 0.75) 0 0 0 1px;
|
|
||||||
$editMoveableSelectedShdw: rgba($editColor, 0.5) 0 0 10px;
|
|
||||||
$editBorderDrilledIn: 1px dashed $editColorAlt;
|
|
||||||
$colorGridLines: rgba($editColor, 0.2);
|
|
||||||
|
|
||||||
/************************************************** BROWSING */
|
/************************************************** BROWSING */
|
||||||
$browseSelectableBorderHov: 1px dotted rgba($colorBodyFg, 0.2);
|
$browseFrameColor: pullForward($colorBodyBg, 10%);
|
||||||
$browseSelectableShdwHov: rgba($colorBodyFg, 0.2) 0 0 3px;
|
$browseFrameBorder: 1px solid $browseFrameColor; // Frames in Disp and Flex Layouts when frame is showing
|
||||||
$browseSelectedBorder: 1px solid rgba($colorBodyFg, 0.6);
|
$browseSelectableShdwHov: rgba($colorBodyFg, 0.3) 0 0 3px;
|
||||||
|
$browseSelectedBorder: 1px solid rgba($colorBodyFg, 0.4);
|
||||||
|
|
||||||
|
/************************************************** EDITING */
|
||||||
|
$editUIColor: $uiColor; // Base color
|
||||||
|
$editUIColorHov: pullForward(saturate($uiColor, 10%), 20%); // Hover color when $editUIColor is applied as a base color
|
||||||
|
$editUIBaseColor: #cae1ff; // Base color, toolbar bg
|
||||||
|
$editUIBaseColorHov: pushBack($editUIBaseColor, 20%);
|
||||||
|
$editUIBaseColorFg: #4c4c4c; // Toolbar button icon colors, etc.
|
||||||
|
$editUIAreaBaseColor: pullForward(saturate($editUIBaseColor, 30%), 20%);
|
||||||
|
$editUIAreaShdw: $editUIAreaBaseColor 0 0 0 2px; // Edit area s-selected-parent
|
||||||
|
$editUIAreaShdwSelected: $editUIAreaBaseColor 0 0 0 3px; // Edit area s-selected
|
||||||
|
$editUIGridColorBg: rgba($editUIBaseColor, 0.2); // Background of layout editing area
|
||||||
|
$editUIGridColorFg: rgba($editUIBaseColor, 0.3); // Grid lines in layout editing area
|
||||||
|
$editFrameColor: $browseFrameColor; // Solid or dotted border applied to non-selected frames in a layout; move-bar on frame hover
|
||||||
|
$editFrameBorder: 1px dotted $editFrameColor;
|
||||||
|
$editFrameColorHov: $editUIColor; // Solid border hover on frames; hover should not be applied to selected objects
|
||||||
|
$editFrameBorderHov: 1px solid $editFrameColorHov; // Hover on selectable frames
|
||||||
|
$editFrameColorSelected: #333; // Border of selected frames
|
||||||
|
$editFrameColorHandleBg: $colorBodyBg; // Resize handle 'offset' color to make handle standout
|
||||||
|
$editFrameColorHandleFg: $editFrameColorSelected; // Resize handle main color
|
||||||
|
$editFrameSelectedShdw: rgba(black, 0.5) 0 1px 10px 1px;
|
||||||
|
$editFrameSelectedBorder: 1px dashed $editFrameColorSelected; // Selected frame element
|
||||||
|
$editFrameMovebarColorBg: $editFrameColor; // Movebar bg color
|
||||||
|
$editFrameMovebarColorFg: pullForward($editFrameMovebarColorBg, 20%); // Grippy lines, container size text
|
||||||
|
$editFrameHovMovebarColorBg: pullForward($editFrameMovebarColorBg, 10%); // Hover style
|
||||||
|
$editFrameHovMovebarColorFg: pullForward($editFrameMovebarColorFg, 10%);
|
||||||
|
$editFrameSelectedMovebarColorBg: pullForward($editFrameMovebarColorBg, 15%); // Selected style
|
||||||
|
$editFrameSelectedMovebarColorFg: pullForward($editFrameMovebarColorFg, 15%);
|
||||||
|
$editFrameMovebarH: 10px; // Height of move bar in layout frame
|
||||||
|
|
||||||
// Icons
|
// Icons
|
||||||
$colorIconAlias: #4af6f3;
|
$colorIconAlias: #4af6f3;
|
||||||
@@ -149,7 +159,7 @@ $colorTabsHolderBg: rgba($colorBodyFg, 0.2);
|
|||||||
|
|
||||||
// Buttons and Controls
|
// Buttons and Controls
|
||||||
$colorBtnBg: #aaa;
|
$colorBtnBg: #aaa;
|
||||||
$colorBtnBgHov: darken($colorBtnBg, 10%);
|
$colorBtnBgHov: pullForward($colorBtnBg, 10%);
|
||||||
$colorBtnFg: #fff;
|
$colorBtnFg: #fff;
|
||||||
$colorBtnReverseFg: $colorBodyBg;
|
$colorBtnReverseFg: $colorBodyBg;
|
||||||
$colorBtnReverseBg: $colorBodyFg;
|
$colorBtnReverseBg: $colorBodyFg;
|
||||||
@@ -157,7 +167,7 @@ $colorBtnFgHov: $colorBtnFg;
|
|||||||
$colorBtnMajorBg: $colorKey;
|
$colorBtnMajorBg: $colorKey;
|
||||||
$colorBtnMajorBgHov: $colorKeyHov;
|
$colorBtnMajorBgHov: $colorKeyHov;
|
||||||
$colorBtnMajorFg: $colorKeyFg;
|
$colorBtnMajorFg: $colorKeyFg;
|
||||||
$colorBtnMajorFgHov: lighten($colorBtnMajorFg, 10%);
|
$colorBtnMajorFgHov: pushBack($colorBtnMajorFg, 10%);
|
||||||
$colorBtnCautionBg: #f16f6f;
|
$colorBtnCautionBg: #f16f6f;
|
||||||
$colorBtnCautionBgHov: #f1504e;
|
$colorBtnCautionBgHov: #f1504e;
|
||||||
$colorBtnCautionFg: $colorBtnFg;
|
$colorBtnCautionFg: $colorBtnFg;
|
||||||
@@ -165,15 +175,15 @@ $colorClickIcon: $colorKey;
|
|||||||
$colorClickIconBgHov: rgba($colorKey, 0.2);
|
$colorClickIconBgHov: rgba($colorKey, 0.2);
|
||||||
$colorClickIconFgHov: $colorKeyHov;
|
$colorClickIconFgHov: $colorKeyHov;
|
||||||
$colorDropHint: $colorKey;
|
$colorDropHint: $colorKey;
|
||||||
$colorDropHintBg: lighten($colorDropHint, 30%);
|
$colorDropHintBg: pushBack($colorDropHint, 10%);
|
||||||
$colorDropHintBgHov: lighten($colorDropHint, 40%);
|
$colorDropHintBgHov: pushBack($colorDropHint, 40%);
|
||||||
$colorDropHintFg: lighten($colorDropHint, 0);
|
$colorDropHintFg: pushBack($colorDropHint, 0);
|
||||||
$colorDisclosureCtrl: rgba($colorBodyFg, 0.5);
|
$colorDisclosureCtrl: rgba($colorBodyFg, 0.5);
|
||||||
$colorDisclosureCtrlHov: rgba($colorBodyFg, 0.7);
|
$colorDisclosureCtrlHov: rgba($colorBodyFg, 0.7);
|
||||||
|
|
||||||
// Menus
|
// Menus
|
||||||
$colorMenuBg: lighten($colorBodyBg, 10%);
|
$colorMenuBg: pushBack($colorBodyBg, 10%);
|
||||||
$colorMenuFg: darken($colorMenuBg, 70%);
|
$colorMenuFg: pullForward($colorMenuBg, 70%);
|
||||||
$colorMenuIc: $colorKey;
|
$colorMenuIc: $colorKey;
|
||||||
$colorMenuHovBg: $colorMenuIc;
|
$colorMenuHovBg: $colorMenuIc;
|
||||||
$colorMenuHovFg: $colorMenuBg;
|
$colorMenuHovFg: $colorMenuBg;
|
||||||
@@ -200,27 +210,27 @@ $colorFormLines: rgba(#000, 0.1);
|
|||||||
$colorFormSectionHeader: rgba(#000, 0.05);
|
$colorFormSectionHeader: rgba(#000, 0.05);
|
||||||
$colorInputBg: $colorGenBg;
|
$colorInputBg: $colorGenBg;
|
||||||
$colorInputFg: $colorBodyFg;
|
$colorInputFg: $colorBodyFg;
|
||||||
$colorInputPlaceholder: lighten($colorBodyFg, 20%);
|
$colorInputPlaceholder: pushBack($colorBodyFg, 20%);
|
||||||
$colorFormText: lighten($colorBodyFg, 10%);
|
$colorFormText: pushBack($colorBodyFg, 10%);
|
||||||
$colorInputIcon: lighten($colorBodyFg, 25%);
|
$colorInputIcon: pushBack($colorBodyFg, 25%);
|
||||||
$colorFieldHint: darken($colorBodyFg, 40%);
|
$colorFieldHint: pullForward($colorBodyFg, 40%);
|
||||||
$shdwInput: inset rgba(black, 0.7) 0 0 1px;
|
$shdwInput: inset rgba(black, 0.7) 0 0 1px;
|
||||||
$shdwInputHov: inset rgba(black, 0.7) 0 0 2px;
|
$shdwInputHov: inset rgba(black, 0.7) 0 0 2px;
|
||||||
$shdwInputFoc: inset rgba(black, 0.8) 0 0.25px 3px;
|
$shdwInputFoc: inset rgba(black, 0.8) 0 0.25px 3px;
|
||||||
|
|
||||||
// Inspector
|
// Inspector
|
||||||
$colorInspectorBg: darken($colorBodyBg, 5%);
|
$colorInspectorBg: pullForward($colorBodyBg, 5%);
|
||||||
$colorInspectorFg: $colorBodyFg;
|
$colorInspectorFg: $colorBodyFg;
|
||||||
$colorInspectorPropName: lighten($colorBodyFg, 20%);
|
$colorInspectorPropName: pushBack($colorBodyFg, 20%);
|
||||||
$colorInspectorPropVal: darken($colorInspectorFg, 15%);
|
$colorInspectorPropVal: pullForward($colorInspectorFg, 15%);
|
||||||
$colorInspectorSectionHeaderBg: darken($colorInspectorBg, 5%);
|
$colorInspectorSectionHeaderBg: pullForward($colorInspectorBg, 5%);
|
||||||
$colorInspectorSectionHeaderFg: darken($colorInspectorBg, 40%);
|
$colorInspectorSectionHeaderFg: pullForward($colorInspectorBg, 40%);
|
||||||
|
|
||||||
// Overlay
|
// Overlay
|
||||||
$overlayColorBg: $colorMenuBg;
|
$overlayColorBg: $colorMenuBg;
|
||||||
$overlayColorFg: $colorMenuFg;
|
$overlayColorFg: $colorMenuFg;
|
||||||
$overlayCr: $interiorMarginLg;
|
$overlayCr: $interiorMarginLg;
|
||||||
$overlayBrightnessAdjust: brightness(1);
|
$overlayBrightnessAdjust: brightness(1.3);
|
||||||
|
|
||||||
// Indicator colors
|
// Indicator colors
|
||||||
$colorIndicatorAvailable: $colorKey;
|
$colorIndicatorAvailable: $colorKey;
|
||||||
@@ -229,8 +239,8 @@ $colorIndicatorOn: $colorOk;
|
|||||||
$colorIndicatorOff: #666;
|
$colorIndicatorOff: #666;
|
||||||
|
|
||||||
// Staleness
|
// Staleness
|
||||||
$colorTelemFresh: darken($colorBodyFg, 20%);
|
$colorTelemFresh: pullForward($colorBodyFg, 20%);
|
||||||
$colorTelemStale: lighten($colorBodyFg, 20%);
|
$colorTelemStale: pushBack($colorBodyFg, 20%);
|
||||||
$styleTelemStale: italic;
|
$styleTelemStale: italic;
|
||||||
|
|
||||||
// Limits
|
// Limits
|
||||||
@@ -255,23 +265,23 @@ $colorInfoBubbleBg: $colorMenuBg;
|
|||||||
$colorInfoBubbleFg: #666;
|
$colorInfoBubbleFg: #666;
|
||||||
|
|
||||||
// Items
|
// Items
|
||||||
$colorItemBg: lighten($colorBtnBg, 20%);
|
$colorItemBg: pushBack($colorBtnBg, 20%);
|
||||||
$colorItemBgHov: lighten($colorItemBg, 5%);
|
$colorItemBgHov: pushBack($colorItemBg, 5%);
|
||||||
$colorListItemBg: transparent;
|
$colorListItemBg: transparent;
|
||||||
$colorListItemBgHov: rgba($colorKey, 0.1);
|
$colorListItemBgHov: rgba($colorKey, 0.1);
|
||||||
$colorItemFg: $colorBodyFg;
|
$colorItemFg: $colorBodyFg;
|
||||||
$colorItemFgDetails: lighten($colorItemFg, 15%);
|
$colorItemFgDetails: pushBack($colorItemFg, 15%);
|
||||||
$shdwItemText: none;
|
$shdwItemText: none;
|
||||||
|
|
||||||
// Tabular
|
// Tabular
|
||||||
$colorTabBorder: darken($colorBodyBg, 10%);
|
$colorTabBorder: pullForward($colorBodyBg, 10%);
|
||||||
$colorTabBodyBg: $colorBodyBg;
|
$colorTabBodyBg: $colorBodyBg;
|
||||||
$colorTabBodyFg: darken($colorBodyFg, 20%);
|
$colorTabBodyFg: pullForward($colorBodyFg, 20%);
|
||||||
$colorTabHeaderBg: darken($colorBodyBg, 10%);
|
$colorTabHeaderBg: pullForward($colorBodyBg, 10%);
|
||||||
$colorTabHeaderFg: darken($colorBodyFg, 20%);
|
$colorTabHeaderFg: pullForward($colorBodyFg, 20%);
|
||||||
$colorTabHeaderBorder: $colorBodyBg;
|
$colorTabHeaderBorder: $colorBodyBg;
|
||||||
$colorTabGroupHeaderBg: darken($colorBodyBg, 5%);
|
$colorTabGroupHeaderBg: pullForward($colorBodyBg, 5%);
|
||||||
$colorTabGroupHeaderFg: darken($colorTabGroupHeaderBg, 40%);
|
$colorTabGroupHeaderFg: pullForward($colorTabGroupHeaderBg, 40%);
|
||||||
|
|
||||||
// Plot
|
// Plot
|
||||||
$colorPlotBg: rgba(black, 0.05);
|
$colorPlotBg: rgba(black, 0.05);
|
||||||
@@ -280,22 +290,22 @@ $colorPlotHash: black;
|
|||||||
$opacityPlotHash: 0.2;
|
$opacityPlotHash: 0.2;
|
||||||
$stylePlotHash: dashed;
|
$stylePlotHash: dashed;
|
||||||
$colorPlotAreaBorder: $colorInteriorBorder;
|
$colorPlotAreaBorder: $colorInteriorBorder;
|
||||||
$colorPlotLabelFg: lighten($colorPlotFg, 20%);
|
$colorPlotLabelFg: pushBack($colorPlotFg, 20%);
|
||||||
$legendHoverValueBg: rgba($colorBodyFg, 0.2);
|
$legendHoverValueBg: rgba($colorBodyFg, 0.2);
|
||||||
|
|
||||||
// Tree
|
// Tree
|
||||||
$colorTreeBg: transparent;
|
$colorTreeBg: transparent;
|
||||||
$colorItemTreeHoverBg: darken($colorBodyBg, 10%);
|
$colorItemTreeHoverBg: pullForward($colorBodyBg, 10%);
|
||||||
$colorItemTreeHoverFg: darken($colorBodyFg, 10%);
|
$colorItemTreeHoverFg: pullForward($colorBodyFg, 10%);
|
||||||
$colorItemTreeIcon: $colorKey; // Used
|
$colorItemTreeIcon: $colorKey; // Used
|
||||||
$colorItemTreeIconHover: $colorItemTreeIcon; // Used
|
$colorItemTreeIconHover: $colorItemTreeIcon; // Used
|
||||||
$colorItemTreeFg: $colorBodyFg;
|
$colorItemTreeFg: $colorBodyFg;
|
||||||
$colorItemTreeSelectedBg: lighten($colorKey, 15%);
|
$colorItemTreeSelectedBg: pushBack($colorKey, 15%);
|
||||||
$colorItemTreeSelectedFg: $colorBodyBg;
|
$colorItemTreeSelectedFg: $colorBodyBg;
|
||||||
$colorItemTreeSelectedIcon: $colorItemTreeSelectedFg;
|
$colorItemTreeSelectedIcon: $colorItemTreeSelectedFg;
|
||||||
$colorItemTreeEditingBg: $editColor;
|
$colorItemTreeEditingBg: pushBack($editUIColor, 20%);
|
||||||
$colorItemTreeEditingFg: $editColorFg;
|
$colorItemTreeEditingFg: $editUIColor;
|
||||||
$colorItemTreeEditingIcon: $editColorFg;
|
$colorItemTreeEditingIcon: $editUIColor;
|
||||||
$colorItemTreeVC: $colorDisclosureCtrl;
|
$colorItemTreeVC: $colorDisclosureCtrl;
|
||||||
$colorItemTreeVCHover: $colorDisclosureCtrlHov;
|
$colorItemTreeVCHover: $colorDisclosureCtrlHov;
|
||||||
$shdwItemTreeIcon: none;
|
$shdwItemTreeIcon: none;
|
||||||
@@ -307,16 +317,16 @@ $colorThumbHoverBg: $colorItemTreeHoverBg;
|
|||||||
$scrollbarTrackSize: 7px;
|
$scrollbarTrackSize: 7px;
|
||||||
$scrollbarTrackShdw: rgba(#000, 0.2) 0 1px 2px;
|
$scrollbarTrackShdw: rgba(#000, 0.2) 0 1px 2px;
|
||||||
$scrollbarTrackColorBg: rgba(#000, 0.2);
|
$scrollbarTrackColorBg: rgba(#000, 0.2);
|
||||||
$scrollbarThumbColor: darken($colorBodyBg, 50%);
|
$scrollbarThumbColor: pullForward($colorBodyBg, 50%);
|
||||||
$scrollbarThumbColorHov: $colorKey;
|
$scrollbarThumbColorHov: $colorKey;
|
||||||
$scrollbarThumbColorMenu: darken($colorMenuBg, 10%);
|
$scrollbarThumbColorMenu: pullForward($colorMenuBg, 10%);
|
||||||
$scrollbarThumbColorMenuHov: darken($scrollbarThumbColorMenu, 2%);
|
$scrollbarThumbColorMenuHov: darken($scrollbarThumbColorMenu, 2%);
|
||||||
|
|
||||||
// Splitter
|
// Splitter
|
||||||
$splitterHandleD: 2px;
|
$splitterHandleD: 2px;
|
||||||
$splitterHandleHitMargin: 4px;
|
$splitterHandleHitMargin: 4px;
|
||||||
$colorSplitterBaseBg: $colorBodyBg;
|
$colorSplitterBaseBg: $colorBodyBg;
|
||||||
$colorSplitterBg: darken($colorSplitterBaseBg, 20%);
|
$colorSplitterBg: pullForward($colorSplitterBaseBg, 20%);
|
||||||
$colorSplitterFg: $colorBodyBg;
|
$colorSplitterFg: $colorBodyBg;
|
||||||
$colorSplitterHover: $colorKey;
|
$colorSplitterHover: $colorKey;
|
||||||
$colorSplitterActive: $colorKey;
|
$colorSplitterActive: $colorKey;
|
||||||
@@ -330,7 +340,7 @@ $splitterCollapsedBtnColorBgHov: $colorKey;
|
|||||||
$splitterCollapsedBtnColorFgHov: $colorKeyFg;
|
$splitterCollapsedBtnColorFgHov: $colorKeyFg;
|
||||||
|
|
||||||
// Mobile
|
// Mobile
|
||||||
$colorMobilePaneLeft: darken($colorBodyBg, 2%);
|
$colorMobilePaneLeft: pullForward($colorBodyBg, 2%);
|
||||||
$colorMobilePaneLeftTreeItemBg: rgba($colorBodyFg, 0.1);
|
$colorMobilePaneLeftTreeItemBg: rgba($colorBodyFg, 0.1);
|
||||||
$colorMobilePaneLeftTreeItemFg: $colorItemTreeFg;
|
$colorMobilePaneLeftTreeItemFg: $colorItemTreeFg;
|
||||||
$colorMobileSelectListTreeItemBg: rgba(#000, 0.05);
|
$colorMobileSelectListTreeItemBg: rgba(#000, 0.05);
|
||||||
@@ -370,16 +380,6 @@ $createBtnTextTransform: uppercase;
|
|||||||
background: $c;
|
background: $c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin themedSelect($bg: $colorBtnBg, $fg: $colorBtnFg) {
|
||||||
/**************************************************** NOT USED, LEAVE FOR NOW */
|
@include cSelect($bg, $fg, lighten($bg, 20%), none);
|
||||||
|
}
|
||||||
// Content status
|
|
||||||
/*
|
|
||||||
$colorAlert: #ff3c00;
|
|
||||||
$colorWarningHi: #990000;
|
|
||||||
$colorWarningLo: #ff9900;
|
|
||||||
$colorDiagnostic: #a4b442;
|
|
||||||
$colorCommand: #3693bd;
|
|
||||||
$colorInfo: #2294a2;
|
|
||||||
$colorOk: #33cc33;
|
|
||||||
*/
|
|
||||||
|
|||||||
@@ -228,6 +228,17 @@ input[type=number]::-webkit-outer-spin-button {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// SELECTS
|
||||||
|
select {
|
||||||
|
@include appearanceNone();
|
||||||
|
@include themedSelect();
|
||||||
|
background-repeat: no-repeat, no-repeat;
|
||||||
|
background-position: right .4em top 80%, 0 0;
|
||||||
|
border: none;
|
||||||
|
border-radius: $controlCr;
|
||||||
|
padding: 1px 20px 1px $interiorMargin;
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************** HYPERLINKS AND HYPERLINK BUTTONS */
|
/******************************************************** HYPERLINKS AND HYPERLINK BUTTONS */
|
||||||
.c-hyperlink {
|
.c-hyperlink {
|
||||||
&--link {
|
&--link {
|
||||||
@@ -411,7 +422,7 @@ input[type=number]::-webkit-outer-spin-button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@mixin cToolbarSeparator() {
|
@mixin cToolbarSeparator() {
|
||||||
$m: $interiorMargin;
|
$m: 1px;
|
||||||
$b: 1px;
|
$b: 1px;
|
||||||
display: block;
|
display: block;
|
||||||
width: $m + $b; // Allow for border
|
width: $m + $b; // Allow for border
|
||||||
@@ -421,21 +432,35 @@ input[type=number]::-webkit-outer-spin-button {
|
|||||||
|
|
||||||
.c-toolbar {
|
.c-toolbar {
|
||||||
$p: $interiorMargin;
|
$p: $interiorMargin;
|
||||||
border-top: 1px solid $colorInteriorBorder;
|
background: $editUIBaseColor;
|
||||||
|
border-radius: $basicCr;
|
||||||
height: $p + 24px; // Need to standardize the height
|
height: $p + 24px; // Need to standardize the height
|
||||||
padding-top: $p;
|
padding: $p;
|
||||||
|
|
||||||
|
> * + * {
|
||||||
|
margin-left: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
&__separator {
|
&__separator {
|
||||||
@include cToolbarSeparator();
|
@include cToolbarSeparator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.c-click-icon,
|
||||||
|
.c-labeled-input {
|
||||||
|
color: $editUIBaseColorFg;
|
||||||
|
}
|
||||||
|
|
||||||
.c-click-icon {
|
.c-click-icon {
|
||||||
@include cControl();
|
@include cControl();
|
||||||
$pLR: $interiorMargin - 1;
|
$pLR: $interiorMargin - 1;
|
||||||
$pTB: 2px;
|
$pTB: 2px;
|
||||||
color: $colorBodyFg;
|
|
||||||
padding: $pTB $pLR;
|
padding: $pTB $pLR;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: $editUIBaseColorHov !important;
|
||||||
|
color: $editUIBaseColorFg !important;
|
||||||
|
}
|
||||||
|
|
||||||
&--swatched {
|
&--swatched {
|
||||||
padding-bottom: floor($pTB / 2);
|
padding-bottom: floor($pTB / 2);
|
||||||
width: 2em; // Standardize the width
|
width: 2em; // Standardize the width
|
||||||
|
|||||||
@@ -191,8 +191,8 @@ body.desktop .has-local-controls {
|
|||||||
.c-grid {
|
.c-grid {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|
||||||
&__x { @include bgTicks($editCanvasColorGrid, 'x'); }
|
&__x { @include bgTicks($editUIGridColorFg, 'x'); }
|
||||||
&__y { @include bgTicks($editCanvasColorGrid, 'y'); }
|
&__y { @include bgTicks($editUIGridColorFg, 'y'); }
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************** SELECTION */
|
/*************************** SELECTION */
|
||||||
@@ -200,32 +200,14 @@ body.desktop .has-local-controls {
|
|||||||
&:hover {
|
&:hover {
|
||||||
box-shadow: $browseSelectableShdwHov;
|
box-shadow: $browseSelectableShdwHov;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&[s-selected] {
|
||||||
|
border: $browseSelectedBorder;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**************************** EDITING */
|
/**************************** EDITING */
|
||||||
.is-editing {
|
.is-editing {
|
||||||
*:not(.is-drilled-in).c-frame {
|
|
||||||
border: $editSelectableBorder;
|
|
||||||
|
|
||||||
&:not([s-selected]) {
|
|
||||||
&:hover {
|
|
||||||
border: $editSelectableBorderHov;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
&[s-selected] {
|
|
||||||
box-shadow: $editSelectableShdwSelected;
|
|
||||||
|
|
||||||
> .c-frame-edit {
|
|
||||||
display: block; // Show the editing rect and handles
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
*.is-drilled-in {
|
|
||||||
border: $editBorderDrilledIn;
|
|
||||||
}
|
|
||||||
|
|
||||||
.is-moveable {
|
.is-moveable {
|
||||||
cursor: move;
|
cursor: move;
|
||||||
}
|
}
|
||||||
@@ -234,116 +216,8 @@ body.desktop .has-local-controls {
|
|||||||
// Applied in markup to objects that provide links. Disable while editing.
|
// Applied in markup to objects that provide links. Disable while editing.
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.c-frame-edit {
|
|
||||||
// In Layouts, this is the editing rect and handles
|
|
||||||
// In Fixed Position, this is a wrapper element
|
|
||||||
$z: 10;
|
|
||||||
|
|
||||||
@include abs();
|
|
||||||
display: none;
|
|
||||||
|
|
||||||
&__move {
|
|
||||||
@include abs();
|
|
||||||
box-shadow: $editMoveableSelectedShdw;
|
|
||||||
cursor: move;
|
|
||||||
z-index: $z;
|
|
||||||
}
|
|
||||||
|
|
||||||
&__handle {
|
|
||||||
$d: 8px;
|
|
||||||
$o: floor($d * -0.5);
|
|
||||||
background: rgba($editColor, 0.3);
|
|
||||||
border: 1px solid $editColor;
|
|
||||||
position: absolute;
|
|
||||||
width: $d; height: $d;
|
|
||||||
top: auto; right: auto; bottom: auto; left: auto;
|
|
||||||
z-index: $z + 1;
|
|
||||||
|
|
||||||
&:before {
|
|
||||||
// Extended hit area
|
|
||||||
$m: -5px;
|
|
||||||
content: '';
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
top: $m; right: $m; bottom: $m; left: $m;
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
&:hover {
|
|
||||||
background: $editColor;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--nwse {
|
|
||||||
cursor: nwse-resize;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--nw {
|
|
||||||
cursor: nw-resize;
|
|
||||||
left: $o; top: $o;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--ne {
|
|
||||||
cursor: ne-resize;
|
|
||||||
right: $o; top: $o;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--se {
|
|
||||||
cursor: se-resize;
|
|
||||||
right: $o; bottom: $o;
|
|
||||||
}
|
|
||||||
|
|
||||||
&--sw {
|
|
||||||
cursor: sw-resize;
|
|
||||||
left: $o; bottom: $o;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: move this into DisplayLayout and Fixed Position vue files respectively
|
|
||||||
.l-shell__main-container > .l-layout,
|
|
||||||
.l-shell__main-container > .c-object-view .l-fixed-position {
|
|
||||||
// Target the top-most layout container and color its background
|
|
||||||
background: $editCanvasColorBg;
|
|
||||||
}
|
|
||||||
|
|
||||||
.l-shell__main-container {
|
|
||||||
box-shadow: $colorBodyBg 0 0 0 1px, rgba($editColor, 0.7) 0 0 0 2px;
|
|
||||||
&[s-selected] {
|
|
||||||
// Provide a clearer selection context articulation
|
|
||||||
box-shadow: $colorBodyBg 0 0 0 1px, $editColor 0 0 0px 3px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Layouts
|
|
||||||
[s-selected],
|
|
||||||
[s-selected-parent] {
|
|
||||||
.l-layout {
|
|
||||||
// Show the layout grid for the top-most child of the current selection,
|
|
||||||
// and hide the grid for deeper nested levels.
|
|
||||||
[class*="__grid-holder"] {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.l-layout [class*="__grid-holder"] {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Fixed position
|
|
||||||
.l-fixed-position {
|
|
||||||
&__grid-holder {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
|
|
||||||
.c-frame-edit {
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/************************** LEGACY */
|
/************************** LEGACY */
|
||||||
|
|
||||||
mct-container {
|
mct-container {
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ mct-plot {
|
|||||||
// Holds the plot area and the X-axis only
|
// Holds the plot area and the X-axis only
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: nth($plotDisplayArea, 1);
|
top: nth($plotDisplayArea, 1);
|
||||||
right:0; //nth($plotDisplayArea, 2);
|
right:0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: nth($plotDisplayArea, 4);
|
left: nth($plotDisplayArea, 4);
|
||||||
|
|
||||||
@@ -612,3 +612,16 @@ mct-plot {
|
|||||||
min-height: 200px;
|
min-height: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************* EDITING */
|
||||||
|
.is-editing {
|
||||||
|
// Fixed position
|
||||||
|
.l-fixed-position {
|
||||||
|
&__grid-holder {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.c-frame-edit {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -60,6 +60,16 @@
|
|||||||
width: $d;
|
width: $d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin appearanceNone() {
|
||||||
|
-moz-appearance: none;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
appearance: none;
|
||||||
|
|
||||||
|
&:focus {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@mixin isAlias() {
|
@mixin isAlias() {
|
||||||
&:after {
|
&:after {
|
||||||
color:$colorIconAlias;
|
color:$colorIconAlias;
|
||||||
@@ -80,8 +90,7 @@
|
|||||||
transparent 50%, rgba($c, $a) 50%,
|
transparent 50%, rgba($c, $a) 50%,
|
||||||
rgba($c, $a) 75%, transparent 75%,
|
rgba($c, $a) 75%, transparent 75%,
|
||||||
transparent 100%
|
transparent 100%
|
||||||
);
|
) repeat;
|
||||||
background-repeat: repeat;
|
|
||||||
background-size: $d $d;
|
background-size: $d $d;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -91,8 +100,7 @@
|
|||||||
transparent 50%, rgba($c, $a) 50%,
|
transparent 50%, rgba($c, $a) 50%,
|
||||||
rgba($c, $a) 75%, transparent 75%,
|
rgba($c, $a) 75%, transparent 75%,
|
||||||
transparent 100%
|
transparent 100%
|
||||||
);
|
) repeat;
|
||||||
background-repeat: repeat;
|
|
||||||
background-size: $bgsize $bgsize;
|
background-size: $bgsize $bgsize;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,6 +110,23 @@
|
|||||||
cursor: default !important;
|
cursor: default !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin grippy($c: rgba(black, 0.5), $dir: 'x') {
|
||||||
|
$deg: 90deg;
|
||||||
|
$bgSize: 2px 100%;
|
||||||
|
|
||||||
|
@if $dir != 'x' {
|
||||||
|
// Grippy texture runs 'vertically'
|
||||||
|
$deg: 0deg;
|
||||||
|
$bgSize: 100% 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
background: linear-gradient($deg,
|
||||||
|
$c 1px, transparent 1px,
|
||||||
|
transparent 100%
|
||||||
|
) repeat;
|
||||||
|
background-size: $bgSize;
|
||||||
|
}
|
||||||
|
|
||||||
@mixin noColor() {
|
@mixin noColor() {
|
||||||
// A "no fill/stroke" selection option. Used in palettes.
|
// A "no fill/stroke" selection option. Used in palettes.
|
||||||
$c: red;
|
$c: red;
|
||||||
@@ -194,7 +219,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@mixin htmlInputReset() {
|
@mixin htmlInputReset() {
|
||||||
appearance: none;
|
@include appearanceNone();
|
||||||
background: transparent;
|
background: transparent;
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
@@ -263,6 +288,7 @@
|
|||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
line-height: $fs; // Remove effect on top and bottom padding
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
&:before,
|
&:before,
|
||||||
@@ -272,6 +298,10 @@
|
|||||||
flex: 0 0 auto;
|
flex: 0 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
}
|
}
|
||||||
@@ -279,15 +309,18 @@
|
|||||||
[class*="__label"] {
|
[class*="__label"] {
|
||||||
@include ellipsize();
|
@include ellipsize();
|
||||||
display: block;
|
display: block;
|
||||||
line-height: $fs; // Remove effect on top and bottom padding
|
|
||||||
font-size: $fs;
|
font-size: $fs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&[class*='icon'] > [class*="__label"] {
|
||||||
|
// When button holds both an icon and a label, provide margin between them.
|
||||||
|
margin-left: $interiorMarginSm;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@mixin cButton() {
|
@mixin cButton() {
|
||||||
@include cControl();
|
@include cControl();
|
||||||
@include themedButton();
|
@include themedButton();
|
||||||
//@include buttonBehavior();
|
|
||||||
border-radius: $controlCr;
|
border-radius: $controlCr;
|
||||||
color: $colorBtnFg;
|
color: $colorBtnFg;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
@@ -329,12 +362,12 @@
|
|||||||
// Make the icon bigger relative to its container
|
// Make the icon bigger relative to its container
|
||||||
@include cControl();
|
@include cControl();
|
||||||
$pLR: 4px;
|
$pLR: 4px;
|
||||||
$pTB: 3px;
|
$pTB: 4px;
|
||||||
background: none;
|
background: none;
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
border-radius: $controlCr;
|
border-radius: $controlCr;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: $pTB $pLR ;
|
padding: $pTB $pLR;
|
||||||
|
|
||||||
@include hover() {
|
@include hover() {
|
||||||
background: $colorClickIconBgHov;
|
background: $colorClickIconBgHov;
|
||||||
@@ -421,6 +454,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin cSelect($bg, $fg, $arwClr, $shdw) {
|
||||||
|
$svgArwClr: str-slice(inspect($arwClr), 2, str-length(inspect($arwClr))); // Remove initial # in color value
|
||||||
|
background: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10'%3e%3cpath fill='%23#{$svgArwClr}' d='M5 5l5-5H0z'/%3e%3c/svg%3e"), $bg;
|
||||||
|
color: $fg;
|
||||||
|
box-shadow: $shdw;
|
||||||
|
}
|
||||||
|
|
||||||
@mixin wrappedInput() {
|
@mixin wrappedInput() {
|
||||||
// An input that is wrapped. Optionally includes a __label or icon element.
|
// An input that is wrapped. Optionally includes a __label or icon element.
|
||||||
// Based on .c-search.
|
// Based on .c-search.
|
||||||
|
|||||||
@@ -20,9 +20,10 @@
|
|||||||
* at runtime from the About dialog for additional information.
|
* at runtime from the About dialog for additional information.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
<template>
|
<template>
|
||||||
<div class="u-contents c-so-view has-local-controls"
|
<div class="c-so-view has-local-controls"
|
||||||
:class="{
|
:class="{
|
||||||
'c-so-view--no-frame': !hasFrame
|
'c-so-view--no-frame': !hasFrame,
|
||||||
|
'has-complex-content': complexContent
|
||||||
}">
|
}">
|
||||||
<div class="c-so-view__header">
|
<div class="c-so-view__header">
|
||||||
<div class="c-so-view__header__start">
|
<div class="c-so-view__header__start">
|
||||||
@@ -47,10 +48,15 @@
|
|||||||
@import "~styles/sass-base";
|
@import "~styles/sass-base";
|
||||||
|
|
||||||
.c-so-view {
|
.c-so-view {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
/*************************** HEADER */
|
/*************************** HEADER */
|
||||||
&__header {
|
&__header {
|
||||||
|
flex: 0 0 auto;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
margin-bottom: $interiorMargin;
|
||||||
|
|
||||||
&__start,
|
&__start,
|
||||||
&__end {
|
&__end {
|
||||||
@@ -71,7 +77,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&--no-frame .c-so-view__header {
|
&--no-frame > .c-so-view__header {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,6 +113,11 @@
|
|||||||
import ObjectView from './ObjectView.vue'
|
import ObjectView from './ObjectView.vue'
|
||||||
import ContextMenuDropDown from './contextMenuDropDown.vue';
|
import ContextMenuDropDown from './contextMenuDropDown.vue';
|
||||||
|
|
||||||
|
const SIMPLE_CONTENT_TYPES = [
|
||||||
|
'clock',
|
||||||
|
'summary-widget'
|
||||||
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
inject: ['openmct'],
|
inject: ['openmct'],
|
||||||
props: {
|
props: {
|
||||||
@@ -114,21 +125,19 @@
|
|||||||
objectPath: Array,
|
objectPath: Array,
|
||||||
hasFrame: Boolean,
|
hasFrame: Boolean,
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
cssClass() {
|
|
||||||
if (!this.domainObject || !this.domainObject.type) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let objectType = this.openmct.types.get(this.domainObject.type);
|
|
||||||
if (!objectType || !objectType.definition) {
|
|
||||||
return; // TODO: return unknown icon type.
|
|
||||||
}
|
|
||||||
return objectType.definition.cssClass;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
ObjectView,
|
ObjectView,
|
||||||
ContextMenuDropDown,
|
ContextMenuDropDown,
|
||||||
|
},
|
||||||
|
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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
<a class="c-tree__item__label"
|
<a class="c-tree__item__label"
|
||||||
draggable="true"
|
draggable="true"
|
||||||
@dragstart="dragStart"
|
@dragstart="dragStart"
|
||||||
|
@click="navigateOrPreview"
|
||||||
:href="objectLink">
|
:href="objectLink">
|
||||||
<div class="c-tree__item__type-icon"
|
<div class="c-tree__item__type-icon"
|
||||||
:class="typeClass"></div>
|
:class="typeClass"></div>
|
||||||
@@ -13,12 +14,19 @@
|
|||||||
|
|
||||||
import ObjectLink from '../mixins/object-link';
|
import ObjectLink from '../mixins/object-link';
|
||||||
import ContextMenuGesture from '../mixins/context-menu-gesture';
|
import ContextMenuGesture from '../mixins/context-menu-gesture';
|
||||||
|
import PreviewAction from '../preview/PreviewAction.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [ObjectLink, ContextMenuGesture],
|
mixins: [ObjectLink, ContextMenuGesture],
|
||||||
inject: ['openmct'],
|
inject: ['openmct'],
|
||||||
props: {
|
props: {
|
||||||
domainObject: Object
|
domainObject: Object,
|
||||||
|
objectPath: {
|
||||||
|
type: Array,
|
||||||
|
default() {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -32,6 +40,7 @@ export default {
|
|||||||
});
|
});
|
||||||
this.$once('hook:destroyed', removeListener);
|
this.$once('hook:destroyed', removeListener);
|
||||||
}
|
}
|
||||||
|
this.previewAction = new PreviewAction(this.openmct);
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
typeClass() {
|
typeClass() {
|
||||||
@@ -43,8 +52,32 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
navigateOrPreview(event) {
|
||||||
|
if (this.openmct.editor.isEditing()){
|
||||||
|
event.preventDefault();
|
||||||
|
this.preview();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
preview() {
|
||||||
|
if (this.previewAction.appliesTo(this.objectPath)){
|
||||||
|
this.previewAction.invoke(this.objectPath);
|
||||||
|
}
|
||||||
|
},
|
||||||
dragStart(event) {
|
dragStart(event) {
|
||||||
event.dataTransfer.setData("domainObject", JSON.stringify(this.observedObject));
|
let navigatedObject = this.openmct.router.path[0];
|
||||||
|
let serializedPath = JSON.stringify(this.objectPath);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Cannot inspect data transfer objects on dragover/dragenter so impossible to determine composability at
|
||||||
|
* that point. If dragged object can be composed by navigated object, then indicate with presence of
|
||||||
|
* 'composable-domain-object' in data transfer
|
||||||
|
*/
|
||||||
|
if (this.openmct.composition.checkPolicy(navigatedObject, this.observedObject)) {
|
||||||
|
event.dataTransfer.setData("openmct/composable-domain-object", JSON.stringify(this.domainObject));
|
||||||
|
}
|
||||||
|
// serialize domain object anyway, because some views can drag-and-drop objects without composition
|
||||||
|
// (eg. notabook.)
|
||||||
|
event.dataTransfer.setData("openmct/domain-object-path", serializedPath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -88,26 +88,25 @@ export default {
|
|||||||
this.updateView(immediatelySelect);
|
this.updateView(immediatelySelect);
|
||||||
},
|
},
|
||||||
onDragOver(event) {
|
onDragOver(event) {
|
||||||
event.preventDefault();
|
if (this.hasComposableDomainObject(event)) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onDrop(event) {
|
onDrop(event) {
|
||||||
let parentObject = this.currentObject;
|
if (this.hasComposableDomainObject(event)) {
|
||||||
let d = event.dataTransfer.getData("domainObject");
|
let composableDomainObject = this.getComposableDomainObject(event);
|
||||||
|
this.currentObject.composition.push(composableDomainObject.identifier);
|
||||||
if (d) {
|
this.openmct.objects.mutate(this.currentObject, 'composition', this.currentObject.composition);
|
||||||
let childObject = JSON.parse(d);
|
|
||||||
|
|
||||||
if (this.openmct.composition.checkPolicy(parentObject, childObject)){
|
|
||||||
if (!this.openmct.editor.isEditing() && parentObject.type !== 'folder'){
|
|
||||||
this.openmct.editor.edit();
|
|
||||||
}
|
|
||||||
parentObject.composition.push(childObject.identifier);
|
|
||||||
this.openmct.objects.mutate(parentObject, 'composition', parentObject.composition);
|
|
||||||
}
|
|
||||||
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
hasComposableDomainObject(event) {
|
||||||
|
return event.dataTransfer.types.includes('openmct/composable-domain-object')
|
||||||
|
},
|
||||||
|
getComposableDomainObject(event) {
|
||||||
|
let serializedDomainObject = event.dataTransfer.getData('openmct/composable-domain-object');
|
||||||
|
return JSON.parse(serializedDomainObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
v-if="elements.length > 0">
|
v-if="elements.length > 0">
|
||||||
<li :key="element.identifier.key" v-for="(element, index) in elements" @drop="moveTo(index)" @dragover="allowDrop">
|
<li :key="element.identifier.key" v-for="(element, index) in elements" @drop="moveTo(index)" @dragover="allowDrop">
|
||||||
<div class="c-tree__item c-elements-pool__item">
|
<div class="c-tree__item c-elements-pool__item">
|
||||||
<span class="icon-grippy"
|
<span class="c-elements-pool__grippy"
|
||||||
v-if="elements.length > 1 && isEditing"
|
v-if="elements.length > 1 && isEditing"
|
||||||
draggable="true"
|
draggable="true"
|
||||||
@dragstart="moveFrom(index)">
|
@dragstart="moveFrom(index)">
|
||||||
@@ -42,12 +42,13 @@
|
|||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
&__item {
|
&__grippy {
|
||||||
.icon-grippy {
|
$d: 8px;
|
||||||
font-size: 0.8em;
|
@include grippy($c: $colorItemTreeVC, $dir: 'y');
|
||||||
}
|
margin-right: $interiorMarginSm;
|
||||||
|
transform: translateY(-2px);
|
||||||
|
width: $d; height: $d;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.js-last-place{
|
.js-last-place{
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="l-browse-bar">
|
<div class="l-browse-bar">
|
||||||
<div class="l-browse-bar__start">
|
<div class="l-browse-bar__start">
|
||||||
<button class="l-browse-bar__nav-to-parent-button c-click-icon c-click-icon--major icon-pointer-left"></button>
|
<button v-if="hasParent"
|
||||||
|
class="l-browse-bar__nav-to-parent-button c-click-icon c-click-icon--major icon-pointer-left"
|
||||||
|
@click="goToParent"></button>
|
||||||
<div class="l-browse-bar__object-name--w"
|
<div class="l-browse-bar__object-name--w"
|
||||||
:class="type.cssClass">
|
:class="type.cssClass">
|
||||||
<span
|
<span
|
||||||
@@ -53,6 +55,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NotebookSnapshot from '../utils/notebook-snapshot';
|
import NotebookSnapshot from '../utils/notebook-snapshot';
|
||||||
|
const PLACEHOLDER_OBJECT = {};
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
inject: ['openmct'],
|
inject: ['openmct'],
|
||||||
@@ -95,12 +98,15 @@ import NotebookSnapshot from '../utils/notebook-snapshot';
|
|||||||
snapshot() {
|
snapshot() {
|
||||||
let element = document.getElementsByClassName("l-shell__main-container")[0];
|
let element = document.getElementsByClassName("l-shell__main-container")[0];
|
||||||
this.notebookSnapshot.capture(this.domainObject, element);
|
this.notebookSnapshot.capture(this.domainObject, element);
|
||||||
|
},
|
||||||
|
goToParent(){
|
||||||
|
window.location.hash = this.parentUrl;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
showViewMenu: false,
|
showViewMenu: false,
|
||||||
domainObject: {},
|
domainObject: PLACEHOLDER_OBJECT,
|
||||||
viewKey: undefined,
|
viewKey: undefined,
|
||||||
isEditing: this.openmct.editor.isEditing()
|
isEditing: this.openmct.editor.isEditing()
|
||||||
}
|
}
|
||||||
@@ -122,6 +128,15 @@ import NotebookSnapshot from '../utils/notebook-snapshot';
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
hasParent() {
|
||||||
|
return this.domainObject !== PLACEHOLDER_OBJECT &&
|
||||||
|
this.parentUrl !== '#/browse'
|
||||||
|
},
|
||||||
|
parentUrl() {
|
||||||
|
let objectKeyString = this.openmct.objects.makeKeyString(this.domainObject.identifier);
|
||||||
|
let hash = window.location.hash;
|
||||||
|
return hash.slice(0, hash.lastIndexOf('/' + objectKeyString));
|
||||||
|
},
|
||||||
type() {
|
type() {
|
||||||
let objectType = this.openmct.types.get(this.domainObject.type);
|
let objectType = this.openmct.types.get(this.domainObject.type);
|
||||||
if (!objectType) {
|
if (!objectType) {
|
||||||
|
|||||||
@@ -184,7 +184,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/******************************* MAIN AREA */
|
/******************************* MAIN AREA */
|
||||||
|
|
||||||
&__main-container {
|
&__main-container {
|
||||||
// Wrapper for main views
|
// Wrapper for main views
|
||||||
flex: 1 1 auto !important;
|
flex: 1 1 auto !important;
|
||||||
@@ -232,6 +231,17 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.is-editing {
|
||||||
|
.l-shell__main-container {
|
||||||
|
box-shadow: $colorBodyBg 0 0 0 1px, $editUIAreaShdw;
|
||||||
|
|
||||||
|
&[s-selected] {
|
||||||
|
// Provide a clearer selection context articulation for the main edit area
|
||||||
|
box-shadow: $colorBodyBg 0 0 0 1px, $editUIAreaShdwSelected;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
line-height: 110%;
|
||||||
padding: $interiorMargin - $aPad;
|
padding: $interiorMargin - $aPad;
|
||||||
transition: background 150ms ease;
|
transition: background 150ms ease;
|
||||||
|
|
||||||
@@ -47,7 +48,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.is-selected {
|
&.is-navigated-object {
|
||||||
background: $colorItemTreeSelectedBg;
|
background: $colorItemTreeSelectedBg;
|
||||||
.c-tree__item__type-icon:before {
|
.c-tree__item__type-icon:before {
|
||||||
color: $colorItemTreeIconHover;
|
color: $colorItemTreeIconHover;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<li class="c-tree__item-h">
|
<li class="c-tree__item-h">
|
||||||
<div class="c-tree__item"
|
<div class="c-tree__item"
|
||||||
:class="{ 'is-alias': isAlias }">
|
:class="{ 'is-alias': isAlias, 'is-navigated-object': isNavigated }">
|
||||||
<view-control class="c-tree__item__view-control"
|
<view-control class="c-tree__item__view-control"
|
||||||
:enabled="hasChildren"
|
:enabled="hasChildren"
|
||||||
v-model="expanded">
|
v-model="expanded">
|
||||||
@@ -31,10 +31,13 @@
|
|||||||
node: Object
|
node: Object
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
this.pathToObject = this.buildPathString(this.node.objectPath);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
hasChildren: false,
|
hasChildren: false,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
loaded: false,
|
loaded: false,
|
||||||
|
isNavigated: this.pathToObject === this.openmct.router.currentLocation.path,
|
||||||
children: [],
|
children: [],
|
||||||
expanded: false
|
expanded: false
|
||||||
}
|
}
|
||||||
@@ -47,7 +50,7 @@
|
|||||||
}
|
}
|
||||||
let parentKeyString = this.openmct.objects.makeKeyString(parent.identifier);
|
let parentKeyString = this.openmct.objects.makeKeyString(parent.identifier);
|
||||||
return parentKeyString !== this.node.object.location;
|
return parentKeyString !== this.node.object.location;
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// TODO: should update on mutation.
|
// TODO: should update on mutation.
|
||||||
@@ -65,11 +68,14 @@
|
|||||||
if (this.openmct.composition.get(this.node.object)) {
|
if (this.openmct.composition.get(this.node.object)) {
|
||||||
this.hasChildren = true;
|
this.hasChildren = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.openmct.router.on('change:path', this.highlightIfNavigated);
|
||||||
},
|
},
|
||||||
destroy() {
|
destroy() {
|
||||||
if (this.composition) {
|
if (this.composition) {
|
||||||
this.composition.off('add', this.addChild);
|
this.composition.off('add', this.addChild);
|
||||||
this.composition.off('remove', this.removeChild);
|
this.composition.off('remove', this.removeChild);
|
||||||
|
this.openmct.router.off('change:path', this.highlightIfNavigated);
|
||||||
delete this.composition;
|
delete this.composition;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -102,6 +108,18 @@
|
|||||||
finishLoading () {
|
finishLoading () {
|
||||||
this.isLoading = false;
|
this.isLoading = false;
|
||||||
this.loaded = true;
|
this.loaded = true;
|
||||||
|
},
|
||||||
|
buildPathString(path) {
|
||||||
|
return '/browse/' + path.map(o => o && this.openmct.objects.makeKeyString(o.identifier))
|
||||||
|
.reverse()
|
||||||
|
.join('/');
|
||||||
|
},
|
||||||
|
highlightIfNavigated(newPath, oldPath){
|
||||||
|
if (newPath === this.pathToObject) {
|
||||||
|
this.isNavigated = true;
|
||||||
|
} else if (oldPath === this.pathToObject) {
|
||||||
|
this.isNavigated = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
@@ -61,4 +61,13 @@ export default class PreviewAction {
|
|||||||
onDestroy: () => preview.$destroy()
|
onDestroy: () => preview.$destroy()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
appliesTo(objectPath) {
|
||||||
|
return !this._isNavigatedObject(objectPath)
|
||||||
|
}
|
||||||
|
_isNavigatedObject(objectPath) {
|
||||||
|
let targetObject = objectPath[0];
|
||||||
|
let navigatedObject = this._openmct.router.path[0];
|
||||||
|
return targetObject.identifier.namespace === navigatedObject.identifier.namespace &&
|
||||||
|
targetObject.identifier.key === navigatedObject.identifier.key;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -67,7 +67,7 @@
|
|||||||
if (formKeys.length > 0) {
|
if (formKeys.length > 0) {
|
||||||
toolbarItem.value = this.getFormValue(domainObject, toolbarItem);
|
toolbarItem.value = this.getFormValue(domainObject, toolbarItem);
|
||||||
} else {
|
} else {
|
||||||
toolbarItem.value = _.get(domainObject, item.property);
|
toolbarItem.value = _.get(domainObject, this.getItemProperty(item));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.registerListener(domainObject);
|
this.registerListener(domainObject);
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
if (toolbarItem.formKeys) {
|
if (toolbarItem.formKeys) {
|
||||||
toolbarItem.value = this.getFormValue(newObject, toolbarItem);
|
toolbarItem.value = this.getFormValue(newObject, toolbarItem);
|
||||||
} else {
|
} else {
|
||||||
toolbarItem.value = _.get(newObject, item.property);
|
toolbarItem.value = _.get(newObject, this.getItemProperty(item));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -135,10 +135,13 @@
|
|||||||
getFormValue(domainObject, toolbarItem) {
|
getFormValue(domainObject, toolbarItem) {
|
||||||
let value = {};
|
let value = {};
|
||||||
toolbarItem.formKeys.map(key => {
|
toolbarItem.formKeys.map(key => {
|
||||||
value[key] = _.get(domainObject, toolbarItem.property + "." + key);
|
value[key] = _.get(domainObject, this.getItemProperty(toolbarItem) + "." + key);
|
||||||
});
|
});
|
||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
|
getItemProperty(item) {
|
||||||
|
return (typeof item.property === "function") ? item.property() : item.property;
|
||||||
|
},
|
||||||
removeListeners() {
|
removeListeners() {
|
||||||
if (this.unObserveObjects) {
|
if (this.unObserveObjects) {
|
||||||
this.unObserveObjects.forEach((unObserveObject) => {
|
this.unObserveObjects.forEach((unObserveObject) => {
|
||||||
@@ -156,7 +159,7 @@
|
|||||||
if (domainObject) {
|
if (domainObject) {
|
||||||
let id = this.openmct.objects.makeKeyString(domainObject.identifier);
|
let id = this.openmct.objects.makeKeyString(domainObject.identifier);
|
||||||
|
|
||||||
if (changedItemId === id && item.property === s.property) {
|
if (changedItemId === id && this.getItemProperty(item) === this.getItemProperty(s)) {
|
||||||
toolbarItem.value = value;
|
toolbarItem.value = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -170,12 +173,12 @@
|
|||||||
this.structure.map(s => {
|
this.structure.map(s => {
|
||||||
if (s.formKeys) {
|
if (s.formKeys) {
|
||||||
s.formKeys.forEach(key => {
|
s.formKeys.forEach(key => {
|
||||||
this.openmct.objects.mutate(item.domainObject, item.property + "." + key, value[key]);
|
this.openmct.objects.mutate(item.domainObject, this.getItemProperty(item) + "." + key, value[key]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.openmct.objects.mutate(item.domainObject, item.property, value);
|
this.openmct.objects.mutate(item.domainObject, this.getItemProperty(item), value);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
triggerMethod(item, event) {
|
triggerMethod(item, event) {
|
||||||
|
|||||||
Reference in New Issue
Block a user