[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:
Victor Woeltjen 2015-02-23 18:17:24 -08:00
parent 13793e221e
commit 894a5b8f89
7 changed files with 19 additions and 4 deletions

View File

@ -92,6 +92,12 @@
"property": "stroke",
"glyph": "-",
"control": "color"
},
{
"property": "color",
"glyph": "\u1D1B",
"mandatory": true,
"control": "color"
}
]
},

View File

@ -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%;">
<div style="position: absolute; left: 0px; top: 0px; bottom: 0px; width: 50%; overflow: hidden;">
{{ngModel.name}}

View File

@ -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;">
{{ngModel.element.text}}
</div>

View File

@ -194,6 +194,7 @@ define(
y: Math.floor(position.y / gridSize[1]),
id: id,
stroke: "transparent",
color: "#717171",
width: DEFAULT_DIMENSIONS[0],
height: DEFAULT_DIMENSIONS[1]
});

View File

@ -23,7 +23,8 @@ define(
},
"fixed.text": {
fill: "transparent",
stroke: "transparent"
stroke: "transparent",
color: "#717171"
}
},
DIALOGS = {

View File

@ -20,6 +20,13 @@ define(
function TextProxy(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;
}

View File

@ -15,7 +15,7 @@
<div class="menu dropdown"
ng-controller="ColorController as colors"
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;"
ng-click="ngModel[field] = 'transparent'">
{{ngModel[field] === 'transparent' ? 'x' : '' }}