|
|
|
@ -441,16 +441,16 @@ class PolylineObject extends Base {
|
|
|
|
|
this._elms.lineType.forEach(item => {
|
|
|
|
|
item.value = lineTypeData[i].value
|
|
|
|
|
if (2 < item.value && item.value < 13) {//贴图参数
|
|
|
|
|
document.getElementById('dashTextureDom').style.display = 'flex'
|
|
|
|
|
document.getElementById('dashTextureDom') && (document.getElementById('dashTextureDom').style.display = 'flex')
|
|
|
|
|
} else {
|
|
|
|
|
document.getElementById('dashTextureDom').style.display = 'none'
|
|
|
|
|
document.getElementById('dashTextureDom') && (document.getElementById('dashTextureDom').style.display = 'none')
|
|
|
|
|
}
|
|
|
|
|
if (2 < item.value && item.value < 5) {//尾迹参数
|
|
|
|
|
document.getElementsByClassName('lineSpace')[0].style.display = 'none'
|
|
|
|
|
document.getElementsByClassName('lineSpace')[1].style.display = 'none'
|
|
|
|
|
document.getElementsByClassName('lineSpace')[0] && (document.getElementsByClassName('lineSpace')[0].style.display = 'none')
|
|
|
|
|
document.getElementsByClassName('lineSpace')[1] && (document.getElementsByClassName('lineSpace')[1].style.display = 'none')
|
|
|
|
|
} else {
|
|
|
|
|
document.getElementsByClassName('lineSpace')[0].style.display = 'flex'
|
|
|
|
|
document.getElementsByClassName('lineSpace')[1].style.display = 'flex'
|
|
|
|
|
document.getElementsByClassName('lineSpace')[0] && (document.getElementsByClassName('lineSpace')[0].style.display = 'flex')
|
|
|
|
|
document.getElementsByClassName('lineSpace')[1] && (document.getElementsByClassName('lineSpace')[1].style.display = 'flex')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
break
|
|
|
|
@ -822,6 +822,7 @@ class PolylineObject extends Base {
|
|
|
|
|
set labelLineColor(v) {
|
|
|
|
|
this.options.label.lineColor = v
|
|
|
|
|
this.label.lineColor = v
|
|
|
|
|
let _this = this
|
|
|
|
|
if (this._elms.labelLineColor) {
|
|
|
|
|
this._elms.labelLineColor.forEach((item, i) => {
|
|
|
|
|
let lineColorPicker = new YJColorPicker({
|
|
|
|
@ -844,7 +845,7 @@ class PolylineObject extends Base {
|
|
|
|
|
})
|
|
|
|
|
this._elms.labelBackgroundColorStart[
|
|
|
|
|
i
|
|
|
|
|
] = labelBackgroundColorStartPicker
|
|
|
|
|
] = _this.labelBackgroundColorStartPicker
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -1337,12 +1338,19 @@ class PolylineObject extends Base {
|
|
|
|
|
positions: Cesium.Cartesian3.fromDegreesArrayHeights(fromDegreesArray),
|
|
|
|
|
width: that.options.width,
|
|
|
|
|
clampToGround: ground,
|
|
|
|
|
material: that.getMaterial(that.options.color, that.options.type, that.entity, that.options),
|
|
|
|
|
// material: that.getMaterial(that.options.color, that.options.type, that.entity, that.options),
|
|
|
|
|
zIndex: that.sdk._entityZIndex
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
that.entity.polyline.oriWidth = that.options.width
|
|
|
|
|
that.judgeLine(that.entity, that.options)
|
|
|
|
|
that.entity.polyline.material = that.getMaterial(
|
|
|
|
|
that.options.color,
|
|
|
|
|
that.options.type,
|
|
|
|
|
that.entity,
|
|
|
|
|
that.options
|
|
|
|
|
)
|
|
|
|
|
that.sdk._entityZIndex++
|
|
|
|
|
PolylineObject.createLabel(that)
|
|
|
|
|
// that.entity.polyline.positionsLngLat = positions
|
|
|
|
@ -1549,10 +1557,20 @@ class PolylineObject extends Base {
|
|
|
|
|
// this.attributeCamera = this.options.attribute.camera.content
|
|
|
|
|
// this.attributeGoods = this.options.attribute.goods.content
|
|
|
|
|
|
|
|
|
|
function tabClick(e) {
|
|
|
|
|
if (e === '2' || e === 2) {//点击线条样式
|
|
|
|
|
if (2 < _this.options.type && _this.options.type < 13) {//贴图参数
|
|
|
|
|
document.getElementById('dashTextureDom') && (document.getElementById('dashTextureDom').style.display = 'flex')
|
|
|
|
|
} else {
|
|
|
|
|
document.getElementById('dashTextureDom') && (document.getElementById('dashTextureDom').style.display = 'none')
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 创建标签页
|
|
|
|
|
let tabsElm = new cy_tabs(
|
|
|
|
|
'polyline-object-edit-tabs',
|
|
|
|
|
undefined,
|
|
|
|
|
tabClick,
|
|
|
|
|
this.sdk
|
|
|
|
|
)
|
|
|
|
|
// 颜色组件
|
|
|
|
@ -1612,7 +1630,7 @@ class PolylineObject extends Base {
|
|
|
|
|
this.labelLineColor = 'rgba(255,255,255,1)'
|
|
|
|
|
} //点击清空按钮事件回调
|
|
|
|
|
})
|
|
|
|
|
let labelBackgroundColorStartPicker = new YJColorPicker({
|
|
|
|
|
_this.labelBackgroundColorStartPicker = new YJColorPicker({
|
|
|
|
|
el: contentElm.getElementsByClassName('labelBackgroundColorStart')[0],
|
|
|
|
|
size: 'mini',
|
|
|
|
|
alpha: true,
|
|
|
|
@ -1647,7 +1665,7 @@ class PolylineObject extends Base {
|
|
|
|
|
this._elms.labelColor = [labelColorPicker]
|
|
|
|
|
this._elms.extendColor = [extendColorPicker]
|
|
|
|
|
this._elms.labelLineColor = [lineColorPicker]
|
|
|
|
|
this._elms.labelBackgroundColorStart = [labelBackgroundColorStartPicker]
|
|
|
|
|
this._elms.labelBackgroundColorStart = [_this.labelBackgroundColorStartPicker]
|
|
|
|
|
this._elms.labelBackgroundColorEnd = [labelBackgroundColorEndPicker]
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
|
|
@ -1925,16 +1943,16 @@ class PolylineObject extends Base {
|
|
|
|
|
|
|
|
|
|
//控制参数显隐
|
|
|
|
|
if (2 < this.lineType && this.lineType < 13) {//贴图参数
|
|
|
|
|
document.getElementById('dashTextureDom').style.display = 'flex'
|
|
|
|
|
document.getElementById('dashTextureDom') && (document.getElementById('dashTextureDom').style.display = 'flex')
|
|
|
|
|
} else {
|
|
|
|
|
document.getElementById('dashTextureDom').style.display = 'none'
|
|
|
|
|
document.getElementById('dashTextureDom') && (document.getElementById('dashTextureDom').style.display = 'none')
|
|
|
|
|
}
|
|
|
|
|
if (2 < this.lineType && this.lineType < 5) {//尾迹参数
|
|
|
|
|
document.getElementsByClassName('lineSpace')[0].style.display = 'none'
|
|
|
|
|
document.getElementsByClassName('lineSpace')[1].style.display = 'none'
|
|
|
|
|
document.getElementsByClassName('lineSpace')[0] && (document.getElementsByClassName('lineSpace')[0].style.display = 'none')
|
|
|
|
|
document.getElementsByClassName('lineSpace')[1] && (document.getElementsByClassName('lineSpace')[1].style.display = 'none')
|
|
|
|
|
} else {
|
|
|
|
|
document.getElementsByClassName('lineSpace')[0].style.display = 'flex'
|
|
|
|
|
document.getElementsByClassName('lineSpace')[1].style.display = 'flex'
|
|
|
|
|
document.getElementsByClassName('lineSpace')[0] && (document.getElementsByClassName('lineSpace')[0].style.display = 'flex')
|
|
|
|
|
document.getElementsByClassName('lineSpace')[1] && (document.getElementsByClassName('lineSpace')[1].style.display = 'flex')
|
|
|
|
|
}
|
|
|
|
|
break
|
|
|
|
|
}
|
|
|
|
|