Skip to main content

PositionPreset

position places an element on the canvas using a preset. When position is not custom, Zvid calculates x and y from the project dimensions and item dimensions. If no explicit anchor is set, Zvid uses the same value as the non-custom position.

type PositionPreset =
| "top-left"
| "top-center"
| "top-right"
| "center-left"
| "center-center"
| "center-right"
| "bottom-left"
| "bottom-center"
| "bottom-right"
| "custom";
ValuePlacement
top-leftTop-left corner
top-centerTop edge, centered
top-rightTop-right corner
center-leftLeft edge, vertically centered
center-centerCenter of the canvas
center-rightRight edge, vertically centered
bottom-leftBottom-left corner
bottom-centerBottom edge, centered
bottom-rightBottom-right corner
customUse explicit x and y

Example

{
"type": "TEXT",
"text": "Centered",
"position": "center-center"
}

Used By