|
@@ -37,7 +37,7 @@ var SiteModel = {
|
|
|
|
|
|
|
|
|
|
|
|
- this.createHeightPull();
|
|
|
+ //this.createHeightPull();
|
|
|
|
|
|
if(Potree.settings.isTest && ifDrawDatasetBound){
|
|
|
viewer.addEventListener('allLoaded',()=>{
|
|
@@ -690,7 +690,7 @@ var SiteModel = {
|
|
|
console.log('删除实体:', entity.buildType, entity.sid)
|
|
|
|
|
|
if(this.selected == entity){
|
|
|
- this.height_pull_box.visible = false
|
|
|
+ this.height_pull_box && (this.height_pull_box.visible = false)
|
|
|
this.selectEntity(null)
|
|
|
}
|
|
|
|
|
@@ -747,7 +747,7 @@ var SiteModel = {
|
|
|
if(this.selected == entity || entity && entity.buildType == 'hole')return
|
|
|
//this.buildings.forEach(e=>e.unselect())
|
|
|
this.selected && this.selected.unselect()
|
|
|
- this.height_pull_box.visible = false
|
|
|
+ this.height_pull_box && (this.height_pull_box.visible = false)
|
|
|
|
|
|
|
|
|
if(entity){
|
|
@@ -760,9 +760,9 @@ var SiteModel = {
|
|
|
|
|
|
|
|
|
if(entity && (entity.buildType == 'floor' || entity.buildType == 'room' )){
|
|
|
- this.height_pull_box.visible = true
|
|
|
+ this.height_pull_box && (this.height_pull_box.visible = true)
|
|
|
this.fitPullBox()
|
|
|
- }
|
|
|
+ }
|
|
|
|
|
|
if(entity && !entity.isNew && (entity.buildType == 'building' || entity.buildType == 'room' ) && entity.points.length<2){
|
|
|
this.startInsertion('resume',entity) //继续画
|
|
@@ -776,7 +776,7 @@ var SiteModel = {
|
|
|
|
|
|
|
|
|
fitPullBox: function(){ //自适应拖拽楼层的pullMesh
|
|
|
- if(!this.selected || this.selected.buildType!= 'floor' && this.selected.buildType!= 'room')return
|
|
|
+ if(!this.height_pull_box || !this.selected || this.selected.buildType!= 'floor' && this.selected.buildType!= 'room')return
|
|
|
let bound = new THREE.Box3();
|
|
|
bound.expandByObject(this.selected.box)
|
|
|
let center = bound.getCenter(new THREE.Vector3() )
|
|
@@ -859,7 +859,7 @@ var SiteModel = {
|
|
|
|
|
|
|
|
|
|
|
|
- createHeightPull:function(){ //拖拽楼层的bounding box
|
|
|
+ createHeightPull:function(){ //拖拽楼层的bounding box
|
|
|
let boxGeo = new THREE.BoxBufferGeometry( 1, 1, 1/4 )
|
|
|
let boxMat = new THREE.MeshBasicMaterial({
|
|
|
color:"#F00",
|