删除地形时清除绘制的局部等高线
This commit is contained in:
@ -48,6 +48,15 @@ class BaseDialog {
|
||||
<button class="close">关闭</button>
|
||||
`
|
||||
this._element.body.appendChild(this._element.foot)
|
||||
let curtain = await document.createElement('div')
|
||||
curtain.style.position = 'absolute'
|
||||
curtain.style.top = '0'
|
||||
curtain.style.left = '0'
|
||||
curtain.style.width = '100%'
|
||||
curtain.style.height = '100%'
|
||||
curtain.style.backdropFilter = 'blur(2px)'
|
||||
curtain.style.zIndex = '-999999'
|
||||
this._element.body.appendChild(curtain)
|
||||
|
||||
// 关闭
|
||||
let closeBtnsBox = this._element.body.getElementsByClassName('close-box')[0];
|
||||
|
@ -47,6 +47,11 @@ class ContourAnalysis {
|
||||
YJ.Analysis.AnalysesResults.push(this)
|
||||
this.createNewLine();
|
||||
}
|
||||
|
||||
get type() {
|
||||
return 'ContourAnalysis'
|
||||
}
|
||||
|
||||
createNewLine() {
|
||||
ContourAnalysis.interpolatePoint(this);
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
import Dialog from '../../../Element/Dialog';
|
||||
import { getHost } from "../../../../on";
|
||||
import BaseSource from "../index";
|
||||
import { setActiveViewer, closeRotateAround, closeViewFollow} from '../../../../Global/global'
|
||||
import { setActiveViewer, closeRotateAround, closeViewFollow } from '../../../../Global/global'
|
||||
import { setSplitDirection, syncSplitData } from '../../../../Global/SplitScreen'
|
||||
|
||||
class BaseTerrain extends BaseSource {
|
||||
@ -78,6 +78,11 @@ class BaseTerrain extends BaseSource {
|
||||
close() {
|
||||
this.sdk.viewer.scene.terrainProvider =
|
||||
new Cesium.EllipsoidTerrainProvider({})
|
||||
for (let i = 0; i < YJ.Analysis.AnalysesResults.length; i++) {
|
||||
if (YJ.Analysis.AnalysesResults[i].type === 'ContourAnalysis') {
|
||||
YJ.Analysis.AnalysesResults[i].destroy()
|
||||
}
|
||||
}
|
||||
syncSplitData(this.sdk, this.options.id)
|
||||
|
||||
clearTimeout(this.#updateModelTimeout)
|
||||
@ -156,7 +161,7 @@ class BaseTerrain extends BaseSource {
|
||||
}
|
||||
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 = {
|
||||
|
@ -417,71 +417,11 @@ class StandText extends Base {
|
||||
this.color = 'rgba(255,255,255,1)'
|
||||
},//点击清空按钮事件回调
|
||||
})
|
||||
let labelColorPicker = new YJColorPicker({
|
||||
el: contentElm.getElementsByClassName("labelColor")[0],
|
||||
size: 'mini',//颜色box类型
|
||||
alpha: true,//是否开启透明度
|
||||
defaultColor: this.labelColor,
|
||||
disabled: false,//是否禁止打开颜色选择器
|
||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||
sure: (color) => {
|
||||
this.labelColor = color
|
||||
},//点击确认按钮事件回调
|
||||
clear: () => {
|
||||
this.labelColor = 'rgba(255,255,255,1)'
|
||||
},//点击清空按钮事件回调
|
||||
})
|
||||
let lineColorPicker = new YJColorPicker({
|
||||
el: contentElm.getElementsByClassName("labelLineColor")[0],
|
||||
size: 'mini',//颜色box类型
|
||||
alpha: true,//是否开启透明度
|
||||
defaultColor: this.labelLineColor,
|
||||
disabled: false,//是否禁止打开颜色选择器
|
||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||
sure: (color) => {
|
||||
this.labelLineColor = color
|
||||
},//点击确认按钮事件回调
|
||||
clear: () => {
|
||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
||||
},//点击清空按钮事件回调
|
||||
})
|
||||
let labelBackgroundColorStartPicker = new YJColorPicker({
|
||||
el: contentElm.getElementsByClassName("labelBackgroundColorStart")[0],
|
||||
size: 'mini',
|
||||
alpha: true,
|
||||
defaultColor: this.labelBackgroundColorStart,
|
||||
disabled: false,
|
||||
openPickerAni: 'opacity',
|
||||
sure: (color) => {
|
||||
this.labelBackgroundColorStart = color
|
||||
},
|
||||
clear: () => {
|
||||
this.labelBackgroundColorStart = 'rgba(255,255,255,1)'
|
||||
},
|
||||
})
|
||||
let labelBackgroundColorEndPicker = new YJColorPicker({
|
||||
el: contentElm.getElementsByClassName("labelBackgroundColorEnd")[0],
|
||||
size: 'mini',
|
||||
alpha: true,
|
||||
defaultColor: this.labelBackgroundColorEnd,
|
||||
disabled: false,
|
||||
openPickerAni: 'opacity',
|
||||
sure: (color) => {
|
||||
this.labelBackgroundColorEnd = color
|
||||
},
|
||||
clear: () => {
|
||||
this.labelBackgroundColorEnd = 'rgba(255,255,255,1)'
|
||||
},
|
||||
})
|
||||
|
||||
let all_elm = contentElm.getElementsByTagName("*")
|
||||
this._EventBinding.on(this, all_elm)
|
||||
this._elms = this._EventBinding.element
|
||||
this._elms.color = [colorPicker]
|
||||
this._elms.labelColor = [labelColorPicker]
|
||||
this._elms.labelLineColor = [lineColorPicker]
|
||||
this._elms.labelBackgroundColorStart = [labelBackgroundColorStartPicker]
|
||||
this._elms.labelBackgroundColorEnd = [labelBackgroundColorEndPicker]
|
||||
} else {
|
||||
if (this._DialogObject && this._DialogObject.remove) {
|
||||
this._DialogObject.remove()
|
||||
|
@ -99,7 +99,7 @@ class TrajectoryMotion extends Base {
|
||||
color: options.label.color || '#ffffff',
|
||||
lineWidth: (options.label.lineWidth || options.label.lineWidth === 0) ? options.label.lineWidth : 4,
|
||||
pixelOffset: (options.label.pixelOffset || options.label.pixelOffset === 0) ? options.label.pixelOffset : 20,
|
||||
backgroundColor: options.label.backgroundColor || ['#42c6ef', '#42c6ef'],
|
||||
backgroundColor: options.label.backgroundColor || ['#00ffff80', '#00ffff80'],
|
||||
lineColor: options.label.lineColor || '#00ffff80',
|
||||
scaleByDistance: options.label.scaleByDistance || false,
|
||||
near: (options.label.near || options.label.near === 0) ? options.label.near : 2000,
|
||||
|
Reference in New Issue
Block a user