作者 linmadan

添加新的布局算法

... ... @@ -71,20 +71,16 @@ func CellsLocationAdjust(cells []*domain.LayoutCell) {
preRowMaxDownLength = 0
preRawCellX = cell.X
}
switch cell.Direction {
case domain.DirectionRight:
cell.X = addedRows + cell.X
cell.Y = addedColumns + cell.Y
switch cell.Direction {
case domain.DirectionRight:
addedColumns = addedColumns + cell.Length - 1
case domain.DirectionDown:
cell.X = addedRows + cell.X
cell.Y = addedColumns + cell.Y
if cell.Length > preRowMaxDownLength {
preRowMaxDownLength = cell.Length
}
case domain.DirectionNone:
cell.X = addedRows + cell.X
cell.Y = addedColumns + cell.Y
}
}
}
... ...