diff --git a/platform/features/fixed/bundle.js b/platform/features/fixed/bundle.js
index 4dc01d682e..cf0d7e6a42 100644
--- a/platform/features/fixed/bundle.js
+++ b/platform/features/fixed/bundle.js
@@ -122,14 +122,6 @@ define([
"description": "Set border color",
"control": "color"
},
- {
- "property": "color",
- "cssClass": "icon-T",
- "title": "Text color",
- "description": "Set text color",
- "mandatory": true,
- "control": "color"
- },
{
"property": "url",
"cssClass": "icon-image",
@@ -145,6 +137,82 @@ define([
}
]
},
+ {
+ "items": [
+ {
+ "property": "color",
+ "cssClass": "icon-T",
+ "title": "Text color",
+ "description": "Set text color",
+ "mandatory": true,
+ "control": "color"
+ },
+ {
+ "property": "size",
+ "title": "Text size",
+ "description": "Set text size",
+ "control": "select",
+ "options": [
+ {
+ "value": "8px",
+ "name": "8 px"
+ },
+ {
+ "value": "9px",
+ "name": "9 px"
+ },
+ {
+ "value": "10px",
+ "name": "10 px"
+ },
+ {
+ "value": "11px",
+ "name": "11 px"
+ },
+ {
+ "value": "12px",
+ "name": "12 px"
+ },
+ {
+ "value": "14px",
+ "name": "14 px"
+ },
+ {
+ "value": "16px",
+ "name": "16 px"
+ },
+ {
+ "value": "20px",
+ "name": "20 px"
+ },
+ {
+ "value": "24px",
+ "name": "24 px"
+ },
+ {
+ "value": "30px",
+ "name": "30 px"
+ },
+ {
+ "value": "36px",
+ "name": "36 px"
+ },
+ {
+ "value": "48px",
+ "name": "48 px"
+ },
+ {
+ "value": "72px",
+ "name": "72 px"
+ },
+ {
+ "value": "96px",
+ "name": "96 px"
+ }
+ ]
+ }
+ ]
+ },
{
"items": [
{
diff --git a/platform/features/layout/res/templates/elements/telemetry.html b/platform/features/layout/res/templates/elements/telemetry.html
index 0f5ed58f05..515c919dc4 100644
--- a/platform/features/layout/res/templates/elements/telemetry.html
+++ b/platform/features/layout/res/templates/elements/telemetry.html
@@ -21,7 +21,7 @@
-->
{{ngModel.element.text}}
diff --git a/platform/features/layout/src/FixedController.js b/platform/features/layout/src/FixedController.js
index de3c5a32f6..d2db36bc1f 100644
--- a/platform/features/layout/src/FixedController.js
+++ b/platform/features/layout/src/FixedController.js
@@ -256,7 +256,8 @@ define(
titled: true,
width: DEFAULT_DIMENSIONS[0],
height: DEFAULT_DIMENSIONS[1],
- useGrid: true
+ useGrid: true,
+ size: "14px"
});
//Re-initialize objects, and subscribe to new object
diff --git a/platform/features/layout/src/elements/ElementFactory.js b/platform/features/layout/src/elements/ElementFactory.js
index 8f4e0b09e2..573b7d0fbc 100644
--- a/platform/features/layout/src/elements/ElementFactory.js
+++ b/platform/features/layout/src/elements/ElementFactory.js
@@ -42,7 +42,8 @@ define(
},
"fixed.text": {
fill: "transparent",
- stroke: "transparent"
+ stroke: "transparent",
+ size: "14px"
}
},
DIALOGS = {
diff --git a/platform/features/layout/src/elements/TextProxy.js b/platform/features/layout/src/elements/TextProxy.js
index 939c88c5ef..8fee025170 100644
--- a/platform/features/layout/src/elements/TextProxy.js
+++ b/platform/features/layout/src/elements/TextProxy.js
@@ -58,6 +58,15 @@ define(
*/
proxy.text = new AccessorMutator(element, 'text');
+ /**
+ * Get and/or set the text size of this element.
+ *
+ * @param {string} [size] the new text size (if setting)
+ * @returns {string} the text size
+ * @memberof platform/features/layout.TextProxy#
+ */
+ proxy.size = new AccessorMutator(element, 'size');
+
return proxy;
}
diff --git a/platform/features/layout/test/elements/TextProxySpec.js b/platform/features/layout/test/elements/TextProxySpec.js
index ee6c5044f9..2dd7340771 100644
--- a/platform/features/layout/test/elements/TextProxySpec.js
+++ b/platform/features/layout/test/elements/TextProxySpec.js
@@ -35,7 +35,8 @@ define(
y: 2,
width: 42,
height: 24,
- fill: "transparent"
+ fill: "transparent",
+ size: "20px"
};
testElements = [{}, {}, testElement, {}];
proxy = new TextProxy(
@@ -50,6 +51,12 @@ define(
expect(proxy.fill('#FFF')).toEqual('#FFF');
expect(proxy.fill()).toEqual('#FFF');
});
+
+ it("provides getter/setter for text size", function () {
+ expect(proxy.size()).toEqual('20px');
+ expect(proxy.size('12px')).toEqual('12px');
+ expect(proxy.size()).toEqual('12px');
+ });
});
}
);