Browse Source

Merge branch 'v1.9.0-jm' of http://192.168.0.115:3000/bill/fuse-code into v1.9.0-jm

bill 8 months ago
parent
commit
38ce71e648
3 changed files with 13 additions and 6 deletions
  1. 7 4
      public/lib/potree/potree.js
  2. 1 1
      public/lib/potree/potree.js.map
  3. 5 1
      src/sdk/cover/index.js

+ 7 - 4
public/lib/potree/potree.js

@@ -55651,7 +55651,10 @@
 	        }
 	      }));
 	      [this.line, this.spot].forEach(e => e.addEventListener('drag', e => {
-	        this.dragEnable && cursor.grabbing && this.changePos(e);
+	        if (this.dragEnable && cursor.grabbing) {
+	          var info = viewer.tagTool.getPoseByIntersect(e);
+	          info && this.changePos(info);
+	        }
 	      }));
 	      [this.line, this.spot].forEach(e => e.addEventListener('startDragging', e => {
 	        this.dragEnable && viewer.inputHandler.intersect && setCursor('grabbing', 'add');
@@ -55712,14 +55715,14 @@
 	    this.lineLength = len;
 	    this.updatePose();
 	  }
-	  changePos(e) {
-	    var info = viewer.tagTool.getPoseByIntersect(e);
-	    if (!info) return;
+	  changePos(info) {
 	    this.position.copy(info.position);
 	    this.normal.copy(info.normal);
+	    this.root = info.root;
 	    this.setNorQua();
 	    this.updatePose();
 	    this.dispatchEvent('posChanged');
+	    viewer.dispatchEvent('content_changed');
 	  }
 	  changeOnMesh(onMesh) {
 	    //是否贴在mesh上

File diff suppressed because it is too large
+ 1 - 1
public/lib/potree/potree.js.map


+ 5 - 1
src/sdk/cover/index.js

@@ -1350,6 +1350,10 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes }) => {
                 visibilityTitle(v){ 
                     tag.setTitleVisi(v, 'user')
                 },
+                changePosition({modelId,position,normal}){
+                    let root = viewer.scene.pointclouds.concat(viewer.objs.children).find(e=>e.dataset_id == props.modelId)
+                    tag.changePos({root,position,normal})
+                },
                 changeImage(url){
                     tag.changeMap(url)
                 },
@@ -1390,7 +1394,7 @@ export const enter = ({ dom, mapDom, isLocal, lonlat, scenes }) => {
                     }
                 }, */
                 getCameraDisSquared(){//距离intersect的位置
-                    return viewer.mainViewport.camera.position.distanceToSquared(tag.getWorldPosition()) /* < tag.farSquared */
+                    return viewer.mainViewport.camera.position.distanceToSquared(tag.getWorldPosition(new THREE.Vector3)) /* < tag.farSquared */
                 }, 
                 destory(){
                     tag.dispose()