<reverselayout>

A layout for arranging siblings vertically or horizontally in reverse order.

JavaScript: reverselayout

Extends Layout

reverselayout is just like simplelayout, except that the order of the views it keeps is reversed (bottom to top, or right to left).

reverselayout extends LzLayout, and therefore it is responsible for arranging all of the subviews for the view that it is attached to. The attributes of a view that reverselayout effects are the x and y values.

Example 1. Example reverselayout
<canvas height="60" bgcolor="yellow" >
  <include href="utils/layouts/reverselayout.lzx"/>
  <reverselayout axis="x" spacing="10"/>
  <text text="one"/>
  <text text="two"/>
  <text text="three"/>
</canvas>
Example 2. Example reverselayout with end='false'
<canvas height="60" bgcolor="yellow" >
  <include href="utils/layouts/reverselayout.lzx"/>
  <reverselayout axis="x" end="false" spacing="10"/>
  <text text="one"/>
  <text text="two"/>
  <text text="three"/>
</canvas>
Attributes
Name Usage Type (Tag) Type (JS) Default Category
axis Tag & JS string String y setter
 

The axis in which this layout operates. One of 'x' or 'y'.


end Tag & JS expression any true setter
 

When true (the default), then the layout will push the subviews to the right (or bottom) of the containing view


inset Tag & JS expression any 0 setter
 

A pixel amount to inset the last view controlled by the layout


spacing Tag & JS expression any 0 setter
 

A pixel amount to use between each view in the layout



Attributes inherited from Layout

defaultplacement, delegates, locked, subviews, updateDelegate, view.layouts

Attributes inherited from Node

class, classroot, cloneManager, datapath, id, ignoreAttribute, ignoreplacement, immediateparent, initstage, name, nodeLevel, onconstruct, oninit, parent, placement, subnodes


Methods

setAxis()
reverselayout.setAxis(a)

setter for the axis attribute. The default value is 'y'

Parameters
Name Type Desc
a string 'x' oy 'y'


update()
reverselayout.update()

This method is usually called automatically when any of the views controlled by the layout change their size in the layout axis, or their visibility. However it can be called directly to force the layout to update



Methods inherited from LzLayout

addSubview, ignore, lock, releaseLayout, removeSubview, reset, setLayoutOrder, swapSubviewOrder, unlock

Methods inherited from LzNode

animate, applyConstraint, applyData, childOf, completeInstantiation, construct, createChildren, dataBindAttribute, destroy, determinePlacement, getAttribute, getOption, getUID, init, lookupSourceLocator, searchImmediateSubnodes, searchSubnodes, setAttribute, setDatapath, setID, setName, setOption


Events

Events inherited from LzNode

onconstruct, ondata, oninit