mirror of
https://github.com/nasa/openmct.git
synced 2025-06-19 15:43:48 +00:00
[Fixed Position] Add text color property
Add a property to the Fixed Position toolbar to set text color, WTD-881.
This commit is contained in:
@ -92,6 +92,12 @@
|
|||||||
"property": "stroke",
|
"property": "stroke",
|
||||||
"glyph": "-",
|
"glyph": "-",
|
||||||
"control": "color"
|
"control": "color"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"property": "color",
|
||||||
|
"glyph": "\u1D1B",
|
||||||
|
"mandatory": true,
|
||||||
|
"control": "color"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div ng-style="{ background: ngModel.fill(), border: '1px solid ' + ngModel.stroke() }"
|
<div ng-style="{ background: ngModel.fill(), border: '1px solid ' + ngModel.stroke(), color: ngModel.color() }"
|
||||||
style="width: 100%; height: 100%;">
|
style="width: 100%; height: 100%;">
|
||||||
<div style="position: absolute; left: 0px; top: 0px; bottom: 0px; width: 50%; overflow: hidden;">
|
<div style="position: absolute; left: 0px; top: 0px; bottom: 0px; width: 50%; overflow: hidden;">
|
||||||
{{ngModel.name}}
|
{{ngModel.name}}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<div ng-style="{ background: ngModel.fill(), border: '1px solid ' + ngModel.stroke() }"
|
<div ng-style="{ background: ngModel.fill(), border: '1px solid ' + ngModel.stroke(), color: ngModel.color() }"
|
||||||
style="width: 100%; height: 100%; overflow: hidden;">
|
style="width: 100%; height: 100%; overflow: hidden;">
|
||||||
{{ngModel.element.text}}
|
{{ngModel.element.text}}
|
||||||
</div>
|
</div>
|
@ -194,6 +194,7 @@ define(
|
|||||||
y: Math.floor(position.y / gridSize[1]),
|
y: Math.floor(position.y / gridSize[1]),
|
||||||
id: id,
|
id: id,
|
||||||
stroke: "transparent",
|
stroke: "transparent",
|
||||||
|
color: "#717171",
|
||||||
width: DEFAULT_DIMENSIONS[0],
|
width: DEFAULT_DIMENSIONS[0],
|
||||||
height: DEFAULT_DIMENSIONS[1]
|
height: DEFAULT_DIMENSIONS[1]
|
||||||
});
|
});
|
||||||
|
@ -23,7 +23,8 @@ define(
|
|||||||
},
|
},
|
||||||
"fixed.text": {
|
"fixed.text": {
|
||||||
fill: "transparent",
|
fill: "transparent",
|
||||||
stroke: "transparent"
|
stroke: "transparent",
|
||||||
|
color: "#717171"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
DIALOGS = {
|
DIALOGS = {
|
||||||
|
@ -20,6 +20,13 @@ define(
|
|||||||
function TextProxy(element, index, elements) {
|
function TextProxy(element, index, elements) {
|
||||||
var proxy = new BoxProxy(element, index, elements);
|
var proxy = new BoxProxy(element, index, elements);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get and/or set the text color of this element.
|
||||||
|
* @param {string} [color] the new text color (if setting)
|
||||||
|
* @returns {string} the text color
|
||||||
|
*/
|
||||||
|
proxy.color = new AccessorMutator(element, 'color');
|
||||||
|
|
||||||
return proxy;
|
return proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
<div class="menu dropdown"
|
<div class="menu dropdown"
|
||||||
ng-controller="ColorController as colors"
|
ng-controller="ColorController as colors"
|
||||||
ng-show="toggle.isActive()">
|
ng-show="toggle.isActive()">
|
||||||
<div style="width: 12em; display: block;">
|
<div style="width: 12em; display: block;" ng-if="!structure.mandatory">
|
||||||
<div style="width: 1em; height: 1em; border: 1px gray solid; display: inline-block;"
|
<div style="width: 1em; height: 1em; border: 1px gray solid; display: inline-block;"
|
||||||
ng-click="ngModel[field] = 'transparent'">
|
ng-click="ngModel[field] = 'transparent'">
|
||||||
{{ngModel[field] === 'transparent' ? 'x' : '' }}
|
{{ngModel[field] === 'transparent' ? 'x' : '' }}
|
||||||
|
Reference in New Issue
Block a user