Class: LinearLayout

LinearLayout


new LinearLayout(configs)

线性布局

排列方向
direction:
    + vertical 从上至下排布
    + horizontal 从左至右排布

不重叠,中线对齐
只针对当前的 group

对齐方式
alignment: 
    + start 主轴左侧对齐
    + center 主轴对齐
    + end   主轴右侧对齐
justify: 
    + start 开始时对齐
    + center 居中对齐
    + end   末尾对齐
    + space-between 平均分配空间对齐
Parameters:
Name Type Description
configs LinearLayout~Configs

配置

Implements:

Members


alignment :string

垂直排列方向对齐方式 默认 center

Type:
  • string

direction :string

排列方向 默认 vertical

Type:
  • string

gap :number

边距, 默认是 5

Type:
  • number

justify :string

排列方向对齐方式 默认 center

Type:
  • string

Methods


reflow(group)

重排 在实现时,通过计算栈内每个元素的位置来重排

Parameters:
Name Type Description
group Group | JFlow

栈对象

Implements:

Type Definitions


Configs

线性布局配置

Type:
  • Object
Properties:
Name Type Description
direction string

排列方向 默认 vertical

gap number

边距, 默认是 5

alignment string

垂直排列方向对齐方式 默认 center

justify string

排列方向对齐方式 默认 center