Ver código fonte

Merge branch 'dev' of http://192.168.0.115:3000/bill/fuse into dev

bill 2 anos atrás
pai
commit
091bd98c00

+ 2 - 2
src/views/draw-file/board/editCAD/Controls/UIControl.js

@@ -286,7 +286,7 @@ export default class UIControl{
 
     initTopTable(value){
         let center = {
-            x:700,
+            x:770,
             y:200
         }
         center = coordinate.getXYFromScreen(center)
@@ -297,7 +297,7 @@ export default class UIControl{
 
     initDownTable(value){
         let center = {
-            x:700,
+            x:770,
             y:520
         }
         center = coordinate.getXYFromScreen(center)

+ 6 - 2
src/views/draw-file/board/editCAD/Geometry/Table.js

@@ -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;