浏览代码

fix: rot exit bug

xzw 7 月之前
父节点
当前提交
7d867481da
共有 3 个文件被更改,包括 9 次插入6 次删除
  1. 5 2
      public/lib/potree/potree.js
  2. 1 1
      public/lib/potree/potree.js.map
  3. 3 3
      src/sdk/cover/index.js

+ 5 - 2
public/lib/potree/potree.js

@@ -22085,6 +22085,9 @@
 	            MergeEditor.moveBoundCenterTo(model, new Vector3().fromArray(location));
 	            model.hasLonLat = true;
 	            model.lonLatPos = model.position.clone();
+	          } else if (model.fileType == 'shp') {
+	            model.hasLonLat = true;
+	            model.lonLatPos = model.position.clone();
 	          }
 	          MergeEditor.setModelBtmHeight(model, 0); // 离地高度为0 (因为不想在地图下方所以高程不管了,都在地面上即可)
 	        }
@@ -22134,9 +22137,9 @@
 	          model.updateMatrixWorld();
 	          viewer.updateModelBound();
 	        };
-	        var maintainCenter = () => {
+	        var maintainCenter = e => {
 	          //MergeEditor.maintainBoundXY(model) 
-	          MergeEditor.maintainBoundCenter(model);
+	          e.by2d || MergeEditor.maintainBoundCenter(model);
 	          _updateBound();
 	          model.dispatchEvent('transformChanged');
 	        };

文件差异内容过多而无法显示
+ 1 - 1
public/lib/potree/potree.js.map


+ 3 - 3
src/sdk/cover/index.js

@@ -1089,7 +1089,7 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
                     model.dispatchEvent('transformChanged') //改了position */
                 },
                 changePosition(pos) {//校准取消时执行
-                    console.log('changePosition', model.name, pos.x, pos.y, pos.z) 
+                    //console.log('changePosition', model.name, pos.x, pos.y, pos.z) 
                     if(pos.x == 0 && pos.y == 0 && pos.z == 0 && model.lonLatPos ){
                         model && model.position.copy(model.lonLatPos)
                         console.log('changePosition 使用经纬度坐标', model.name )
@@ -1099,9 +1099,9 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes, laserRoot, laserOS
                     model.dispatchEvent({ type: 'position_changed' })
                 },
                 changeRotation(rot) {//校准取消时执行 
-                    console.log('changeRotation', model.name, rot.x, rot.y, rot.z)
+                    //console.log('changeRotation', model.name, rot.x, rot.y, rot.z)
                     model && model.rotation.setFromVector3(rot)
-                    model.dispatchEvent({ type: 'rotation_changed' })
+                    model.dispatchEvent({ type: 'rotation_changed' , by2d:true})
                 },
 
                 enterRotateMode() {