UIElement:joint

Returns the joint specifying how this element should be laid out by its parent.

This method emits an error when called on an element with no parent.

This method is rarely needed, as you can call joint methods transparently from the corresponding UI Element (eg. element:padding() instead of element:joint():padding()).

Usage

ui_element:joint()

Returns

Name Type Description
joint Joint Joint linking this element to its parent.

Examples

local parent = crystal.Overlay:new();
local child = parent:add_child(crystal.Image:new());
local joint = child:joint();
print(joint:horizontal_alignment()); -- Prints "left"

This site uses Just the Docs, a documentation theme for Jekyll.