二三维增加单独展示在二维或者三维的功能,贴地图片增加设置锚点功能
This commit is contained in:
@ -144,37 +144,54 @@ class TrajectoryMotion extends Base {
|
||||
|
||||
set show(v) {
|
||||
if (typeof v === "boolean") {
|
||||
this.options.show = v
|
||||
if (this.originalOptions) {
|
||||
this.originalOptions.show = v
|
||||
if (!this.isShowView) {
|
||||
this.options.show = v
|
||||
if (this.originalOptions) {
|
||||
this.originalOptions.show = v
|
||||
}
|
||||
}
|
||||
if (v) {
|
||||
if (this.options.show) {
|
||||
if (this.firstPersonView) {
|
||||
this.model.show = false
|
||||
}
|
||||
else {
|
||||
this.model.show = this.modelShow
|
||||
this.model.show = (!this.showView || this.showView == 3) ? this.modelShow : false
|
||||
}
|
||||
|
||||
this.line.polyline.material = this.lineShow ? new Cesium.PolylineDashMaterialProperty({
|
||||
color: new Cesium.Color.fromCssColorString('#00ffff'),
|
||||
dashLength: 20,
|
||||
}) : new Cesium.PolylineDashMaterialProperty({
|
||||
color: new Cesium.Color.fromCssColorString('#00ffff00'),
|
||||
dashLength: 20,
|
||||
})
|
||||
if ((!this.showView || this.showView == 3)) {
|
||||
this.line.polyline.material = this.lineShow ? new Cesium.PolylineDashMaterialProperty({
|
||||
color: new Cesium.Color.fromCssColorString('#00ffff'),
|
||||
dashLength: 20,
|
||||
}) : new Cesium.PolylineDashMaterialProperty({
|
||||
color: new Cesium.Color.fromCssColorString('#00ffff00'),
|
||||
dashLength: 20,
|
||||
})
|
||||
}
|
||||
else {
|
||||
this.line.polyline.material = new Cesium.PolylineDashMaterialProperty({
|
||||
color: new Cesium.Color.fromCssColorString('#00ffff00'),
|
||||
dashLength: 20,
|
||||
})
|
||||
}
|
||||
for (let i = 0; i < this.keyPoints.length; i++) {
|
||||
this.keyPoints[i].show = this.keyPointShow
|
||||
this.keyPoints[i].show = (!this.showView || this.showView == 3) ? this.keyPointShow : false
|
||||
}
|
||||
if (this.realTimeRoute) {
|
||||
this.realTimeLine && (this.realTimeLine.show = true)
|
||||
this.realTimeLine && (this.realTimeLine.show = (!this.showView || this.showView == 3) ? true : false)
|
||||
}
|
||||
this.label && (this.label.show = this.options.label.show)
|
||||
this.label && (this.label.show = (!this.showView || this.showView == 3) ? this.options.label.show : false)
|
||||
}
|
||||
else {
|
||||
this.model.show = v
|
||||
this.model.show = (!this.showView || this.showView == 3) ? this.options.show : false
|
||||
let show = this.options.show
|
||||
if ((!this.showView || this.showView == 3)) {
|
||||
show = this.options.show
|
||||
}
|
||||
else {
|
||||
show = false
|
||||
}
|
||||
this.realTimeLine && (this.realTimeLine.show = false)
|
||||
this.line.polyline.material = v ? new Cesium.PolylineDashMaterialProperty({
|
||||
this.line.polyline.material = show ? new Cesium.PolylineDashMaterialProperty({
|
||||
color: new Cesium.Color.fromCssColorString('#00ffff'),
|
||||
dashLength: 20,
|
||||
}) : new Cesium.PolylineDashMaterialProperty({
|
||||
@ -182,7 +199,7 @@ class TrajectoryMotion extends Base {
|
||||
dashLength: 20,
|
||||
})
|
||||
for (let i = 0; i < this.keyPoints.length; i++) {
|
||||
this.keyPoints[i].show = v
|
||||
this.keyPoints[i].show = (!this.showView || this.showView == 3) ? show : false
|
||||
}
|
||||
this.label && (this.label.show = false)
|
||||
this.viewFollow = false
|
||||
@ -193,6 +210,7 @@ class TrajectoryMotion extends Base {
|
||||
}
|
||||
syncData(this.sdk, this.options.id)
|
||||
syncSplitData(this.sdk, this.options.id)
|
||||
this.isShowView = false
|
||||
} else {
|
||||
console.error("参数必须为boolean")
|
||||
}
|
||||
@ -656,8 +674,15 @@ class TrajectoryMotion extends Base {
|
||||
}
|
||||
set modelShow(v) {
|
||||
this.options.model.show = v
|
||||
let show = v
|
||||
if (this.show && (!this.showView || this.showView == 3)) {
|
||||
show = v
|
||||
}
|
||||
else {
|
||||
show = false
|
||||
}
|
||||
if (this.model && this.show) {
|
||||
this.model.show = v
|
||||
this.model.show = show
|
||||
}
|
||||
this._elms.modelShow && this._elms.modelShow.forEach((item) => {
|
||||
item.checked = v
|
||||
@ -723,8 +748,15 @@ class TrajectoryMotion extends Base {
|
||||
this.realTimeRoute = false
|
||||
}
|
||||
this.options.line.show = v
|
||||
let show = v
|
||||
if ((!this.showView || this.showView == 3)) {
|
||||
show = v
|
||||
}
|
||||
else {
|
||||
show = false
|
||||
}
|
||||
if (this.line && this.show) {
|
||||
this.line.polyline.material = v ? new Cesium.PolylineDashMaterialProperty({
|
||||
this.line.polyline.material = show ? new Cesium.PolylineDashMaterialProperty({
|
||||
color: new Cesium.Color.fromCssColorString('#00ffff'),
|
||||
dashLength: 20, //短划线长度
|
||||
}) : new Cesium.PolylineDashMaterialProperty({
|
||||
@ -994,7 +1026,14 @@ class TrajectoryMotion extends Base {
|
||||
else {
|
||||
CameraController(this.sdk, true)
|
||||
if (this.model && this.modelShow && this.show) {
|
||||
this.model.show = true
|
||||
let show = true
|
||||
if (this.show && (!this.showView || this.showView == 3)) {
|
||||
show = true
|
||||
}
|
||||
else {
|
||||
show = false
|
||||
}
|
||||
this.model.show = show
|
||||
}
|
||||
if (this._DialogObject && this._DialogObject._element.content) {
|
||||
let e_firstPerson = this._DialogObject._element.content.querySelectorAll("button[name='firstPerson']")
|
||||
@ -1116,8 +1155,15 @@ class TrajectoryMotion extends Base {
|
||||
}
|
||||
set labelShow(v) {
|
||||
this.options.label.show = v
|
||||
let show = v
|
||||
if (this.show && (!this.showView || this.showView == 3)) {
|
||||
show = v
|
||||
}
|
||||
else {
|
||||
show = false
|
||||
}
|
||||
if (this.show) {
|
||||
this.label && (this.label.show = v)
|
||||
this.label && (this.label.show = show)
|
||||
if (this.options.label.position) {
|
||||
setTimeout(() => {
|
||||
if (this.options.label.position.alt) {
|
||||
@ -1888,10 +1934,10 @@ class TrajectoryMotion extends Base {
|
||||
this.tip && this.tip.destroy()
|
||||
this.tip = null
|
||||
this.ControllerObject.destroy()
|
||||
if(this.firstPersonView !== this.originalOptions.firstPersonView) {
|
||||
if (this.firstPersonView !== this.originalOptions.firstPersonView) {
|
||||
this.firstPersonView = this.originalOptions.firstPersonView;
|
||||
}
|
||||
if(this.firstPersonView && this.modelShow) {
|
||||
if (this.firstPersonView && this.modelShow) {
|
||||
this.model && (this.model.show = false)
|
||||
}
|
||||
},
|
||||
@ -2164,10 +2210,10 @@ class TrajectoryMotion extends Base {
|
||||
this.modelAnimate = this.originalOptions.model.animate;
|
||||
this.delay = this.originalOptions.delay;
|
||||
(this.ground !== this.originalOptions.ground) && (this.ground = this.originalOptions.ground);
|
||||
if(this.firstPersonView !== this.originalOptions.firstPersonView) {
|
||||
if (this.firstPersonView !== this.originalOptions.firstPersonView) {
|
||||
this.firstPersonView = this.originalOptions.firstPersonView;
|
||||
}
|
||||
if(this.firstPersonView && this.modelShow) {
|
||||
if (this.firstPersonView && this.modelShow) {
|
||||
this.model && (this.model.show = false)
|
||||
}
|
||||
this.labelShow = this.originalOptions.label.show
|
||||
@ -2229,7 +2275,6 @@ class TrajectoryMotion extends Base {
|
||||
this._DialogObject._element.content.getElementsByClassName('model-rotate-btn')[0].innerHTML = '结束调整'
|
||||
this._DialogObject._element.content.getElementsByClassName('model-rotate-btn')[0].className = 'btn model-rotate-btn is-active'
|
||||
}
|
||||
console.log(this._DialogObject._element.content, this._DialogObject._element.content.getElementsByClassName('model-rotate-btn')[0])
|
||||
this.state = false
|
||||
this.editObj = new EditGltf(this.sdk, this.model)
|
||||
this.editObj.editRtation()
|
||||
|
Reference in New Issue
Block a user