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

JavaScript: lz.reverselayout
extends <layout> » <node> » lz.Eventable »

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 <layout>, 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 71. Example of reverselayout

<canvas height="60">
  <include href="utils/layouts/reverselayout.lzx"/>
  <view bgcolor="yellow">
    <reverselayout axis="x" spacing="10"/>
    <text text="one"/>
    <text text="two"/>
    <text text="three"/>
  </view>
</canvas>

Example 72. Example of reverselayout with end='false'

<canvas height="60">
  <include href="utils/layouts/reverselayout.lzx"/>
  <view bgcolor="yellow">
    <reverselayout axis="x" end="false" spacing="10"/>
    <text text="one"/>
    <text text="two"/>
    <text text="three"/>
  </view>
</canvas>

Attributes

Name (CSS property) Type (tag) Type (js) Default Category
axis string String y read/write
  The axis in which this layout operates. One of 'x' or 'y'.
end expression any true read/write
  When true (the default), then the layout will push the subviews to the right (or bottom) of the containing view
inset expression any 0 read/write
  A pixel amount to inset the last view controlled by the layout
spacing expression any 0 read/write
  A pixel amount to use between each view in the layout

Attributes inherited from <layout>

locked, subviews, updateDelegate

Methods

setAxis()
reverselayout.setAxis(a : string);
setter for the axis attribute. The default value is 'y'
Parameter Name Type Description
a string 'x' oy 'y'

update()
reverselayout.update(v);
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
Parameter Name Type Description
v    

Methods inherited from lz.Eventable

destroy, setAttribute

Events

Events inherited from <node>

onconstruct, ondata, oninit

Events inherited from lz.Eventable

ondestroy