ui/split

class Split(instances[, sizes])
Extends:UINodeCollection

This class provides the ability to arrange the attached nodes next to each other in the set direction. The size of each can be changed with the draggable bars divideing the nodes.

Arguments:
  • instances (Array(UINode)) – An array of instances to attach.
  • sizes (Array(Number)) – An array of the sizes for the instances to attach.
direction
Type:String
Default:“horizontal”

This lower-case string sets the direction along which the nodes are arranged. Valid values are “horizontal” or “vertical”. For setting this value it is enough to provide the first letter: “h” or “v”.

Throws Error:If attempting to set an invalid direction or set the direction while more than 1 UINode() is attached.
attach(instance[, leftOf[, rightOf]])

This function attaches an UINode instance.

Arguments:
  • instance (UINode) – The instance to attach.
  • leftOf (UINode|Number) – See UINodeCollection.attach().
  • rightOf (UINode|Number) – See UINodeCollection.attach().
replace(oldInstance, newInstance)

Replaces an instance with a new one.

Arguments:
  • oldInstance (UINode) – Instance to replace.
  • newInstance (UINode) – Instance to take the place.
detach(instance)

Detaches a currently attached instance.

Arguments:
  • instance (UINode) – Instance to detach.
resizeEnabled
Type:Boolean
Default:true

Whether resizing is enabled.