|
@@ -831,7 +831,7 @@ class PanoEditor extends THREE.EventDispatcher{
|
|
|
|
|
|
line.addEventListener('mouseover', ()=>{
|
|
|
if(this.clickToZoomInEnabled)return
|
|
|
- if(this.activeViewName == 'mainView')return
|
|
|
+ //if(this.activeViewName == 'mainView')return
|
|
|
if(this.selectedLine != line)line.material = lineMats.hovered
|
|
|
viewer.dispatchEvent({
|
|
|
type : "CursorChange", action : "add", name:"hoverLine"
|
|
@@ -847,7 +847,7 @@ class PanoEditor extends THREE.EventDispatcher{
|
|
|
});
|
|
|
line.addEventListener('click', (e)=>{
|
|
|
if(this.clickToZoomInEnabled)return
|
|
|
- if(this.activeViewName == 'mainView')return
|
|
|
+ //if(this.activeViewName == 'mainView')return
|
|
|
if(this.operation == 'removeLink'){
|
|
|
if(this.selectedLine == line) this.selectLine(null)
|
|
|
return this.linkChange(pano0, pano1, 'remove')
|
|
@@ -951,7 +951,11 @@ class PanoEditor extends THREE.EventDispatcher{
|
|
|
pano.addEventListener('rePos', setPos.bind(this,circle))
|
|
|
|
|
|
let drag = ()=>{
|
|
|
- if(this.tranMode != 'translate' || this.activeViewName == 'mainView' )return
|
|
|
+ if(this.activeViewName == 'mainView' && this.tranMode == 'translate'){
|
|
|
+ this.transformControls.dispatchEvent('dragging')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(this.tranMode != 'translate')return
|
|
|
this.selectPano(circle.pano) //为了方便拖拽点云,拖动circle就直接选中
|
|
|
|
|
|
viewer.inputHandler.drag.object = null //取消拖拽状态,否则不触发点云拖动
|
|
@@ -1119,9 +1123,11 @@ class PanoEditor extends THREE.EventDispatcher{
|
|
|
let maxCount = 70, minCount = 1, minPer = 0.3, maxPer = 1
|
|
|
percent = maxPer - ( maxPer - minPer) * THREE.Math.clamp((visiCount - minCount) / (maxCount - minCount),0,1) //dis2d越大,角度要越小
|
|
|
//pointcloud.changePointSize()
|
|
|
- console.log('updatePointLevels', percent, visiCount)
|
|
|
+ //console.log('updatePointLevels', percent, visiCount)
|
|
|
|
|
|
- }
|
|
|
+ }else{
|
|
|
+ percent = null
|
|
|
+ }
|
|
|
|
|
|
|
|
|
Potree.settings.UserDensityPercent = percent
|
|
@@ -1140,8 +1146,14 @@ class PanoEditor extends THREE.EventDispatcher{
|
|
|
}
|
|
|
|
|
|
updateSelectGroup(){//更新选中的组
|
|
|
- this.selectedGroup = this.panoGroup.find(e=>e.includes(this.selectedPano))
|
|
|
+ this.selectedGroup = this.panoGroup.find(e=>e.includes(this.selectedPano))
|
|
|
+ if(this.selectedGroup){
|
|
|
+ this.selectedGroup = [this.selectedPano, ...this.selectedGroup.filter(e=>e != this.selectedPano)];//将选中的放第一个,便于旋转时绕其旋转。
|
|
|
+ }
|
|
|
+
|
|
|
this.selectedClouds = this.selectedPano ? (this.selectedGroup || [this.selectedPano]).map(e=>e.pointcloud) : []
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|