|
@@ -131,14 +131,18 @@ export default class Table extends Geometry {
|
|
|
let height=0;
|
|
|
|
|
|
//删除多余的
|
|
|
- for(let i=maxRow+1;i<this.cells.length;++i){
|
|
|
- for(let j=maxCol+1;j<this.cells[i].length;++j){
|
|
|
+ for(let i=maxRow;i<this.cells.length;++i){
|
|
|
+ for(let j=maxCol;j<this.cells[i].length;++j){
|
|
|
const cell = floorplanService.getCell(this.cells[i][j]);
|
|
|
if(cell){
|
|
|
floorplanService.deleteCell(this.cells[i][j]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ this.cells.splice(maxRow, this.cells.length-maxRow);
|
|
|
+ for(let i=0;i<maxRow;++i){
|
|
|
+ this.cells[i].splice(maxCol, this.cells[0].length-maxCol);
|
|
|
+ }
|
|
|
|
|
|
this.rowLen = this.cells.length;
|
|
|
this.colLen = this.cells[0].length;
|