This commit is contained in:
zh
2025-09-24 17:58:22 +08:00
parent 783de5cb7a
commit ad305ae16f
6 changed files with 94 additions and 438 deletions

View File

@ -9,7 +9,7 @@ import MouseEvent from '../../../../Event/index'
import { syncData, getSdk as get2DSdk } from '../../../../Global/MultiViewportMode'
import MouseTip from '../../../../MouseTip'
import { setSplitDirection, syncSplitData, setActiveId } from '../../../../Global/SplitScreen'
import { setActiveViewer, closeRotateAround, closeViewFollow} from '../../../../Global/global'
import { setActiveViewer, closeRotateAround, closeViewFollow } from '../../../../Global/global'
class Smoke extends Base {
/**
@ -109,7 +109,7 @@ class Smoke extends Base {
this.label.show = false
}
}
if(this._DialogObject && this._DialogObject.showBtn) {
if (this._DialogObject && this._DialogObject.showBtn) {
this._DialogObject.showBtn.checked = v
}
syncData(this.sdk, this.options.id)
@ -159,7 +159,7 @@ class Smoke extends Base {
emitter: new Cesium.CircleEmitter(0.2),
performance: false,
modelMatrix: matrix,
updateCallback: (r)=>{
updateCallback: (r) => {
r._billboard.id = this.options.id
}
})
@ -171,8 +171,8 @@ class Smoke extends Base {
this.entity.position = { lng: this.options.lng, lat: this.options.lat, alt: this.options.alt }
// this.editObj = new EditParticle(this.sdk, this.entity)
syncData(this.sdk, this.options.id)
if(this.options.show) {
if (this.options.show) {
setSplitDirection(0, this.options.id)
}
@ -196,7 +196,7 @@ class Smoke extends Base {
}
setActiveViewer(0)
closeRotateAround(this.sdk)
closeViewFollow(this.sdk)
closeViewFollow(this.sdk)
if (this.options.customView && this.options.customView.relativePosition && this.options.customView.orientation) {
let orientation = {
@ -460,6 +460,7 @@ class Smoke extends Base {
* @param state=false {boolean} 状态: true打开, false关闭
*/
async edit(state = false) {
return
let _this = this
this.originalOptions = this.deepCopyObj(this.options)
@ -642,7 +643,7 @@ class Smoke extends Base {
)
})
this.event.mouse_left((movement, cartesian) => {
if(!movPos || movPos.x !== movement.position.x || movPos.y !== movement.position.y-2) {
if (!movPos || movPos.x !== movement.position.x || movPos.y !== movement.position.y - 2) {
let positions = this.cartesian3Towgs84(cartesian, this.sdk.viewer)
this.options.lng = positions.lng
this.options.lat = positions.lat
@ -658,6 +659,10 @@ class Smoke extends Base {
this.event.mouse_right(() => { })
this.event.gesture_pinck_start(() => { })
this.event.gesture_pinck_end(() => { })
if(this._positionEditingCallback) {
this._positionEditingCallback()
this._positionEditingCallback = null
}
this.positionEditing = false
})
this.event.mouse_right((movement, cartesian) => {
@ -708,7 +713,7 @@ class Smoke extends Base {
this.event.gesture_pinck_end(() => { })
}
this.tip && this.tip.destroy()
if(!this.sdk || !this.sdk.viewer || !this.entity) {
if (!this.sdk || !this.sdk.viewer || !this.entity) {
return
}
this.options.lng = this.entity.position.lng
@ -733,7 +738,16 @@ class Smoke extends Base {
return this.operate.positionEditing
}
flicker() {}
openPositionEditing(cd) {
this.positionEditing = true
this._positionEditingCallback = cd
}
closePositionEditing() {
this.positionEditing = false
this._positionEditingCallback = null
}
flicker() { }
}
export default Smoke