正在显示
1 个修改的文件
包含
2 行增加
和
6 行删除
| @@ -71,20 +71,16 @@ func CellsLocationAdjust(cells []*domain.LayoutCell) { | @@ -71,20 +71,16 @@ func CellsLocationAdjust(cells []*domain.LayoutCell) { | ||
| 71 | preRowMaxDownLength = 0 | 71 | preRowMaxDownLength = 0 |
| 72 | preRawCellX = cell.X | 72 | preRawCellX = cell.X |
| 73 | } | 73 | } |
| 74 | - switch cell.Direction { | ||
| 75 | - case domain.DirectionRight: | ||
| 76 | cell.X = addedRows + cell.X | 74 | cell.X = addedRows + cell.X |
| 77 | cell.Y = addedColumns + cell.Y | 75 | cell.Y = addedColumns + cell.Y |
| 76 | + switch cell.Direction { | ||
| 77 | + case domain.DirectionRight: | ||
| 78 | addedColumns = addedColumns + cell.Length - 1 | 78 | addedColumns = addedColumns + cell.Length - 1 |
| 79 | case domain.DirectionDown: | 79 | case domain.DirectionDown: |
| 80 | - cell.X = addedRows + cell.X | ||
| 81 | - cell.Y = addedColumns + cell.Y | ||
| 82 | if cell.Length > preRowMaxDownLength { | 80 | if cell.Length > preRowMaxDownLength { |
| 83 | preRowMaxDownLength = cell.Length | 81 | preRowMaxDownLength = cell.Length |
| 84 | } | 82 | } |
| 85 | case domain.DirectionNone: | 83 | case domain.DirectionNone: |
| 86 | - cell.X = addedRows + cell.X | ||
| 87 | - cell.Y = addedColumns + cell.Y | ||
| 88 | } | 84 | } |
| 89 | } | 85 | } |
| 90 | } | 86 | } |
-
请 注册 或 登录 后发表评论