Fixed Layout Module

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:

  1. bottom – set the element to the bottom the parent, anchor only on left, middle or right
  2. top – set the element to be above the parent, anchor only on left, middle or right
  3. left – set the element to the on the left of the parent, anchor only on top or bottom
  4. right – set the element on the right of the parent, anchor only on the top or bottom

“anchor” values:

  1. middle – set the middle of the element to the middle of the parent
  2. bottom – set the top of the element to the bottom of the parent
  3. top – set the bottom of the element to the top of the parent
  4. left – set the left of the element to the left of the parent
  5. right – set the right of the element to the right of the parent