4
0

3 Commity 1f96f75aa1 ... d7060cfbc6

Autor SHA1 Správa Dátum
  caodongdong d7060cfbc6 Merge branch 'feature_UI调整' of http://101.231.166.56:3000/elab-damai-h5/h5-webgl-program into feature_UI调整 1 rok pred
  caodongdong 73f094411d 改变值为0是无需执行移动方法 1 rok pred
  caodongdong 9265fc1513 关联空间最大值时无法缩放 1 rok pred
1 zmenil súbory, kde vykonal 16 pridanie a 1 odobranie
  1. 16 1
      src/pages/webgl_rxdz/webgl_rxdz.vue

+ 16 - 1
src/pages/webgl_rxdz/webgl_rxdz.vue

@@ -1261,10 +1261,20 @@
 							break;
 						}
 					}else{
+						console.log("排查右边空间",newWidth, element.spaceWidthMax,newWidth, element.spaceWidthMin);
 						if(newWidth > element.spaceWidthMax || newWidth < element.spaceWidthMin){
 							result = false;
 							space = element;
-							const newWidthValue = newWidth > element.spaceWidthMax ? element.spaceWidthMax : element.spaceWidthMin
+							let newWidthValue = newWidth > element.spaceWidthMax ? element.spaceWidthMax : element.spaceWidthMin
+							if(isZoomIn){ // 放大
+								if(newWidth>element.spaceWidthMax){ // 关联空间放大时已经是最大,则变化值为0
+									newValue = 0
+									break;
+								}
+							}else{
+								newWidthValue = newWidth < element.spaceWidthMin ? element.spaceWidthMin : newWidth;
+								console.log("排查右边空间2",newWidth, element.spaceWidthMax, element.spaceWidthMin);
+							}
 							newWidth = newWidthValue - newWidth;
 							const newChangeValue = changeValue - newWidth;
 							if(newValue > newChangeValue){
@@ -1274,6 +1284,7 @@
 						}
 					}
 				}
+				
 				if(!result){
 					this.$message.warning(`关联空间[${ space && space.spaceName || ''}]达到极限值`);
 				}
@@ -2101,6 +2112,10 @@
 				// 	return
 				// }
 				// 隐藏变化空间的家具模型,空间动画结束后显示
+				if(moveValue<= 0){ // 无需变化
+					return
+				}
+
 				this.changeLayoutModelState(); 
 				console.log("关联空间XXXXX", this.leftSpaces, this.rightSpaces)
 			    for (let index = 0; index < this.leftSpaces.length; index++) {