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

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

@@ -50619,8 +50619,13 @@
 	    this.setLineHeight(newLength);
 	    this.dispatchEvent('dragLineLen');
 	  }
+	  reDraw() {
+	    this.pauseUpdateEdge = true;
+	    super.reDraw();
+	    this.pauseUpdateEdge = false;
+	  }
 	  updateEdge() {
-	    if (this.lastUpdatePoints_ && Potree.Common.ifSame(this.lastUpdatePoints_, this.points) && this.halfPathWidth == this.lastHalfPathWidth) return; //没变 不更新
+	    if (this.pauseUpdateEdge || this.lastUpdatePoints_ && Potree.Common.ifSame(this.lastUpdatePoints_, this.points) && this.halfPathWidth == this.lastHalfPathWidth) return; //没变 不更新
 	    //this.edge.geometry = MeshDraw.getExtrudeGeo(edgeExtrudePoints, null,  {extrudePath: this.points, openEnded:true, shapeDontClose:true/* , dontSmooth:true, steps: this.points.length-1 */})
 	    //getExtrudeGeo是平滑过的曲线,和设计不一样,且容易翻转,转角有时候细分过少
 
@@ -51293,7 +51298,7 @@
 	}
 	Path$1.prototype.cloneMarker = Measure$1.prototype.cloneMarker;
 	Path$1.prototype.updateDatasetBelong = Measure$1.prototype.updateDatasetBelong;
-	Path$1.prototype.reDraw = Measure$1.prototype.reDraw;
+	//Path.prototype.reDraw = Measure.prototype.reDraw
 	/* 
 	没有intersect的点的dataset_point怎么赋值
 

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


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

@@ -89,8 +89,9 @@ let addPath = ()=>{//加个他们拍的路径
     
     $('.ui-editor-head').css('pointer-events','none')
     
+    let btnCreated
     let createBtn = ()=>{
-        
+        if(btnCreated)return
         let btn = document.createElement('button')
         btn.innerHTML = '导出',btn.id = 'exportPath'
         $(btn).css({
@@ -102,9 +103,10 @@ let addPath = ()=>{//加个他们拍的路径
             navigator.clipboard.writeText(JSON.stringify(data ) ) 
             alert('复制成功')
         })
+        btnCreated = true
     }
-    let fileName = 'pathPointsNew'    //pathPoints.json
-    Potree.loadFile(Potree.resourcePath+'/'+fileName+'.json', null, (data)=>{
+    
+    window.applyPath = function(data){
         console.log(data)
         window.pathPoints = data
         let points = []
@@ -149,9 +151,13 @@ let addPath = ()=>{//加个他们拍的路径
             createBtn()
             
         }  
-        addedPath = true
+        
+    }
+    let fileName = 'pathPointsNew'    //pathPoints.json
+    Potree.loadFile(Potree.resourcePath+'/'+fileName+'.json', null, (data)=>{
+        window.applyPath(data)  
     })
-    
+    addedPath = true
     
 }