Documentation
Types
RawPosition

RawPosition

type RawPosition = CommonPositionType
    | (Partial<Coord2DPosition> & { xalign?: never; yalign?: never })
    | (Partial<AlignPosition> & { x?: never; y?: never });

For more information, see:

Examples

Example 1

const position: RawPosition = {
    xalign: 0.5, // x: 50%
    yalign: 0.3, // y: 30%
};

Example 2

const position = {
    x: 100, // x: 100px
    y: "50%", // y: 50%
};

Example 3

const position = CommonPosition.Positions.Left; // x: 33.3%, y: 50%

Example 4

const position = {
    xalign: 0.5, // x: 50% + 10px
    yalign: 0.3, // y: 30% + 20px
    xoffset: 10,
    yoffset: 20,
};