|
@@ -63812,7 +63812,7 @@ void main() {
|
|
|
model.updateMatrixWorld();
|
|
|
viewer.updateModelBound();
|
|
|
};
|
|
|
- let maintainBtmZAndCenter = ()=>{
|
|
|
+ let maintainBtmZAndCenter = ()=>{
|
|
|
MergeEditor.maintainBoundXY(model);
|
|
|
MergeEditor.setModelBtmHeight(model);
|
|
|
updateBound();
|
|
@@ -63822,6 +63822,11 @@ void main() {
|
|
|
updateBound();
|
|
|
MergeEditor.getBoundCenter(model);//更新boundcenter
|
|
|
MergeEditor.computeBtmHeight(model);
|
|
|
+ if(prop.bottomRange && (model.btmHeight > prop.bottomRange.max || model.btmHeight < prop.bottomRange.min)){
|
|
|
+ model.btmHeight = MathUtils.clamp(model.btmHeight, prop.bottomRange.min, prop.bottomRange.max);
|
|
|
+ MergeEditor.setModelBtmHeight(model);
|
|
|
+ updateBound();
|
|
|
+ }
|
|
|
model.dispatchEvent('transformChanged');
|
|
|
});
|
|
|
model.addEventListener("orientation_changed", maintainBtmZAndCenter );
|
|
@@ -85305,7 +85310,7 @@ void main() {
|
|
|
}
|
|
|
|
|
|
let desc = this.getEventDesc(e,isTouch);
|
|
|
- if(!clickElement){
|
|
|
+ //if(!clickElement){
|
|
|
this.viewer.dispatchEvent($.extend(
|
|
|
desc,
|
|
|
{
|
|
@@ -85313,7 +85318,7 @@ void main() {
|
|
|
pressDistance
|
|
|
}
|
|
|
));
|
|
|
- }
|
|
|
+ //}
|
|
|
|
|
|
|
|
|
|
|
@@ -91180,7 +91185,8 @@ void main() {
|
|
|
|
|
|
|
|
|
let click = (e) => {//不用"mouseup" 是因为 mouseup有drag object时也会触发
|
|
|
- if(Potree.settings.unableNavigate || this.flying || !e.isTouch && e.button != MOUSE.LEFT || e.drag && e.drag.object //拖拽结束时不算
|
|
|
+ if(e.clickElement ||
|
|
|
+ Potree.settings.unableNavigate || this.flying || !e.isTouch && e.button != MOUSE.LEFT || e.drag && e.drag.object //拖拽结束时不算
|
|
|
|| Potree.settings.editType == 'pano' && viewer.modules.PanoEditor.activeViewName != 'mainView'
|
|
|
|| Potree.settings.editType == 'merge' && !e.intersectPoint || viewer.inputHandler.hoveredElements[0] && viewer.inputHandler.hoveredElements[0].isModel && e.intersectPoint.distance > viewer.inputHandler.hoveredElements[0].distance
|
|
|
) return
|
|
@@ -111226,14 +111232,14 @@ ENDSEC
|
|
|
|
|
|
var CursorDeal = {
|
|
|
priorityEvent : [//在前面的优先级高
|
|
|
-
|
|
|
+ {'zoomInCloud':'zoom-in'},
|
|
|
{'hoverPano':'pointer'},
|
|
|
|
|
|
{'connectPano':`url({Potree.resourcePath}/images/connect.png),auto`},
|
|
|
{'disconnectPano':`url({Potree.resourcePath}/images/connect-dis.png),auto`},
|
|
|
|
|
|
{'hoverLine':'pointer'},
|
|
|
- {'zoomInCloud':'zoom-in'},
|
|
|
+
|
|
|
|
|
|
|
|
|
{"movePointcloud":'move'},
|
|
@@ -112096,7 +112102,7 @@ ENDSEC
|
|
|
|
|
|
getPosOutOfModel(viewport, boundSize){
|
|
|
//let {boundSize, center} = viewer.bound
|
|
|
-
|
|
|
+ boundSize = boundSize || this.getModelBound(viewport).modelSize;
|
|
|
let expand = 10;
|
|
|
let radius = boundSize.length() / 2;
|
|
|
let position = viewport.shiftTarget.clone().sub(viewport.view.direction.clone().multiplyScalar(radius + expand));
|
|
@@ -119631,6 +119637,7 @@ ENDSEC
|
|
|
|
|
|
|
|
|
line.addEventListener('mouseover', ()=>{
|
|
|
+ if(this.clickToZoomInEnabled)return
|
|
|
if(this.activeViewName == 'mainView')return
|
|
|
if(this.selectedLine != line)line.material = lineMats$3.hovered;
|
|
|
viewer.dispatchEvent({
|
|
@@ -119638,6 +119645,7 @@ ENDSEC
|
|
|
});
|
|
|
});
|
|
|
line.addEventListener('mouseleave', ()=>{
|
|
|
+ if(this.clickToZoomInEnabled)return
|
|
|
//if(this.activeViewName == 'mainView')return
|
|
|
if(this.selectedLine != line)line.material = lineMats$3.default;
|
|
|
viewer.dispatchEvent({
|
|
@@ -119645,6 +119653,7 @@ ENDSEC
|
|
|
});
|
|
|
});
|
|
|
line.addEventListener('click', (e)=>{
|
|
|
+ if(this.clickToZoomInEnabled)return
|
|
|
if(this.activeViewName == 'mainView')return
|
|
|
if(this.operation == 'removeLink'){
|
|
|
if(this.selectedLine == line) this.selectLine(null);
|
|
@@ -119759,7 +119768,7 @@ ENDSEC
|
|
|
});
|
|
|
circle.addEventListener('click', ()=>{
|
|
|
//if(this.activeViewName == 'mainView')return
|
|
|
-
|
|
|
+ if(this.clickToZoomInEnabled)return
|
|
|
if(this.operation == 'removeLink'){
|
|
|
this.linkChange(pano, null, 'remove'); //删除所有连接
|
|
|
}
|
|
@@ -119786,6 +119795,7 @@ ENDSEC
|
|
|
|
|
|
|
|
|
hoverPano(pano, state){
|
|
|
+ if(this.clickToZoomInEnabled)return
|
|
|
if(pano && state){ //在hover一个pano之前,一定会先取消已经hover的pano, 最多存在一个hovered的pano
|
|
|
if(this.hoveredPano == pano)return
|
|
|
|