Set a element at a fixed location
Description:
For the defined element, set it’s location.
The element’s position is set as “fixed”.
You can set it at a particular point or relative to a other element.
Point example:
{
"type": "fixed_layout",
"set": {
"element": "#my-element",
"point": {
"x": 100,
"y": 200
}
}
}
Relative example:
{
"type": "fixed_layout",
"set": {
"element": "#my-element",
"target": "#parent",
"at": "bottom",
"anchor": "left",
"margin": 5
}
}
“at” values:
- bottom – set the element to the bottom the parent, anchor only on left, middle or right
- top – set the element to be above the parent, anchor only on left, middle or right
- left – set the element to the on the left of the parent, anchor only on top or bottom
- right – set the element on the right of the parent, anchor only on the top or bottom
“anchor” values:
- middle – set the middle of the element to the middle of the parent
- bottom – set the top of the element to the bottom of the parent
- top – set the bottom of the element to the top of the parent
- left – set the left of the element to the left of the parent
- right – set the right of the element to the right of the parent