Parcourir la source

空间锁定墙体厚的限制值

caodongdong il y a 1 an
Parent
commit
0c578d0af1
1 fichiers modifiés avec 14 ajouts et 6 suppressions
  1. 14 6
      src/pages/webgl_rxdz/webgl_rxdz.vue

+ 14 - 6
src/pages/webgl_rxdz/webgl_rxdz.vue

@@ -1047,7 +1047,15 @@
 						changeValue = changeHeight;
 			
 						that.selectWall(directionIndex);
-						that.moveSpaceWall(that.curWallDirection, isZoomIn, changeValue);
+
+						let checkResult = this.checkRightSpace(!isZoomIn, changeHeight, true, curSpace)
+						console.log("高度达到极限值结果++++++++++++++", checkResult, changeHeight)
+
+						if(!checkResult.result){
+							changeHeight = checkResult.newValue
+						}
+						
+						that.moveSpaceWall(that.curWallDirection, isZoomIn, changeHeight);
 						// 自动补墙逻辑
 						// that.autoCreateWall(directionIndex, curSpace);
 						return
@@ -1111,6 +1119,10 @@
 						let checkResult = this.checkRightSpace(!isZoomIn, changeHeight, true, curSpace)
 						console.log("高度达到极限值结果++++++++++++++", checkResult, changeHeight)
 
+						if(!checkResult.result){
+							changeHeight = checkResult.newValue
+						}
+
 						that.moveSpaceWall(that.curWallDirection, isZoomIn, changeHeight);
 						// 自动补墙逻辑
 						// that.autoCreateWall(directionIndex, curSpace)
@@ -1232,15 +1244,13 @@
 					}
 					let newWidth = element.spaceWidth + n * changeValue;
 					let newHeight = element.spaceHeight + n * changeValue;
-					console.log("关联右空间排查", isZoomIn, isNS, changeValue, newWidth,element.spaceWidthMax, element.spaceWidthMin)
-					console.log("空间排查-0------", changeValue, 1000, newWidth, newValue)
+					
 					if(isNS){
 						if( newHeight > element.spaceHeightMax || newHeight < element.spaceHeightMin){
 							result = false;
 							space = element;
 							const newHeightValue = newHeight > element.spaceHeightMax ? element.spaceHeightMax : element.spaceHeightMin;
 							newHeight = newHeightValue - newHeight;
-							console.log("空间排查-11------", changeValue, 1000, newHeight, newValue)
 							const newChangeValue = changeValue - newHeight;
 							if(newValue > newChangeValue){
 								newValue = newChangeValue;
@@ -1253,12 +1263,10 @@
 							space = element;
 							const newWidthValue = newWidth > element.spaceWidthMax ? element.spaceWidthMax : element.spaceWidthMin
 							newWidth = newWidthValue - newWidth;
-							console.log("空间排查-12------", changeValue, 1000, newWidth, newValue)
 							const newChangeValue = changeValue - newWidth;
 							if(newValue > newChangeValue){
 								newValue = newChangeValue;
 							}
-							console.log("空间排查-2------", changeValue, newChangeValue, newWidth, newValue)
 							break;
 						}
 					}