...
|
...
|
@@ -103,7 +103,7 @@ func CellsLocationAdjust(cells []*domain.LayoutCell) { |
|
|
}
|
|
|
//move = cell.Length
|
|
|
//c = cell
|
|
|
if max(move, cell.Length) != move {
|
|
|
if max(move, cell.Length) != move && c==nil {
|
|
|
c = cell
|
|
|
}
|
|
|
move = max(move, cell.Length)
|
...
|
...
|
@@ -200,7 +200,6 @@ func (ptr *QuerySetService) LoadDataTables(ctx *domain.Context, cells []*domain. |
|
|
func DataLayout(res *domain.DataTable, cells []*domain.LayoutCell) (*domain.DataTable, error) {
|
|
|
dt := &DataLayoutDataTable{
|
|
|
DataTable: res,
|
|
|
//MapDataTables: dataTables,
|
|
|
unprocessed: cells,
|
|
|
}
|
|
|
dt.Init(DefaultExpandNum)
|
...
|
...
|
@@ -266,10 +265,6 @@ func (l *Location) Update(x int, y int, compare func(int, int) int) { |
|
|
}
|
|
|
}
|
|
|
|
|
|
//func (d *DataLayoutDataTable) StartCell() {
|
|
|
//
|
|
|
//}
|
|
|
|
|
|
func (d *DataLayoutDataTable) addByLocation(cell *domain.LayoutCell, blockData []string) {
|
|
|
if d.PointBegin == nil {
|
|
|
d.PointBegin = NewLocation(cell.X, cell.Y)
|
...
|
...
|
@@ -280,20 +275,14 @@ func (d *DataLayoutDataTable) addByLocation(cell *domain.LayoutCell, blockData [ |
|
|
for i := range blockData {
|
|
|
d.DataTable.Data[cell.X][cell.Y+i] = blockData[i]
|
|
|
}
|
|
|
//d.PointEnd.UpdateX(cell.X)
|
|
|
//d.PointEnd.UpdateY(cell.Y + len(blockData) - 1)
|
|
|
d.PointEnd.Update(cell.X, cell.Y+len(blockData)-1, max)
|
|
|
case domain.DirectionDown:
|
|
|
for i := range blockData {
|
|
|
d.DataTable.Data[cell.X+i][cell.Y] = blockData[i]
|
|
|
}
|
|
|
//d.PointEnd.UpdateX(cell.X + len(blockData) - 1)
|
|
|
//d.PointEnd.UpdateY(cell.Y)
|
|
|
d.PointEnd.Update(cell.X+len(blockData)-1, cell.Y, max)
|
|
|
case domain.DirectionNone:
|
|
|
d.DataTable.Data[cell.X][cell.Y] = blockData[0]
|
|
|
//d.PointEnd.UpdateX(cell.X)
|
|
|
//d.PointEnd.UpdateY(cell.Y)
|
|
|
d.PointEnd.Update(cell.X, cell.Y, max)
|
|
|
}
|
|
|
}
|
...
|
...
|
|