Skip to main content

Developers - UI Control

Position

All our UI-controls require an array of name/value-pairs, where name is the shown value, and value is the class to toggle. Some of the controls have an additional display-property used to present custom CSS or icons.

Position

The ui-position-control.

Example:

      "properties": [
{
"name": "Object Position",
"ui": "ui-position",
"values": [
{
"name": "Top Left",
"value": "op-tl"
},
{
"name": "Top Center",
"value": "op-tc"
},
{
"name": "Top Right",
"value": "op-tr"
},
{
"name": "Center Left",
"value": "op-cl"
},
{
"name": "Center Center",
"value": "pf-none"
},
{
"name": "Center Right",
"value": "op-cr"
},
{
"name": "Bottom Left",
"value": "op-bl"
},
{
"name": "Bottom Center",
"value": "op-bc"
},
{
"name": "Bottom Right",
"value": "op-br"
}
]
}
]

tip

If you want an option to be "none" (as in: no selection), set value to pf-none. This tells our script to remove any of the other values from the array of values from the target DOM-node.