[Forms] Add composite control type
Add a type for composite controls, to allow populating arrays (e.g. preferred size). WTD-593.
This commit is contained in:
@@ -13,43 +13,47 @@
|
||||
"model": { "composition": [] },
|
||||
"properties": [
|
||||
{
|
||||
"label": "Preferred Size",
|
||||
"control": "_textfields",
|
||||
"values": [
|
||||
"name": "Preferred Size",
|
||||
"control": "composite",
|
||||
"items": [
|
||||
{
|
||||
"label": "Width (px)",
|
||||
"name": "Width (px)",
|
||||
"control": "textfield",
|
||||
"pattern": "^(\\d*[1-9]\\d*)?$"
|
||||
},
|
||||
{
|
||||
"label": "Height (px)",
|
||||
"name": "Height (px)",
|
||||
"control": "textfield",
|
||||
"pattern": "^(\\d*[1-9]\\d*)?$"
|
||||
}
|
||||
],
|
||||
"key": "preferredSize",
|
||||
"property": "preferredSize",
|
||||
"conversion": "number[]"
|
||||
},
|
||||
{
|
||||
"label": "Layout Grid",
|
||||
"control": "_textfields",
|
||||
"values": [
|
||||
"name": "Layout Grid",
|
||||
"control": "composite",
|
||||
"items": [
|
||||
{
|
||||
"label": "Horizontal grid (px)",
|
||||
"name": "Horizontal grid (px)",
|
||||
"control": "textfield",
|
||||
"pattern": "^(\\d*[1-9]\\d*)?$"
|
||||
},
|
||||
{
|
||||
"label": "Vertical grid (px)",
|
||||
"name": "Vertical grid (px)",
|
||||
"control": "textfield",
|
||||
"pattern": "^(\\d*[1-9]\\d*)?$"
|
||||
}
|
||||
],
|
||||
"key": "layoutGrid",
|
||||
"property": "layoutGrid",
|
||||
"conversion": "number[]"
|
||||
},
|
||||
{
|
||||
"label": "Default View",
|
||||
"control": "_select",
|
||||
"values": [
|
||||
"Plot",
|
||||
"Scrolling"
|
||||
"name": "Default View",
|
||||
"control": "select",
|
||||
"options": [
|
||||
{ "name": "Plot", "value": "plot" },
|
||||
{ "name": "Scrolling", "value": "scrolling" }
|
||||
],
|
||||
"comment": "TODO: Infer values from type",
|
||||
"key": "defaultView"
|
||||
|
||||
Reference in New Issue
Block a user