修改点线面默认样式
This commit is contained in:
@ -24,7 +24,7 @@ class PolyhedronObject extends Base {
|
||||
* @param options.id {string} 唯一标识
|
||||
* @param options.show=true {boolean} 显示/隐藏
|
||||
* @param options.name {string} 名称
|
||||
* @param options.color="#0df7f8" {string} 颜色
|
||||
* @param options.color="#ff0000" {string} 颜色
|
||||
* @param options.height=10 {number} 高
|
||||
* @param {Array.<object>} options.positions 经纬度和高度的列表,值交替 [{lon,lat,alt},...]
|
||||
* @param _Dialog {object} 弹框事件
|
||||
@ -32,7 +32,7 @@ class PolyhedronObject extends Base {
|
||||
* */
|
||||
constructor(sdk, options = {}, _Dialog = {}) {
|
||||
super(sdk, options);
|
||||
this.options.color = options.color || "#0df7f8"
|
||||
this.options.color = options.color || "#ff0000"
|
||||
this.options.show = (options.show || options.show === false) ? options.show : true
|
||||
this.options.height = (options.height || options.height === 0) ? options.height : 10
|
||||
if (this.options.height <= 0.01) {
|
||||
@ -54,8 +54,8 @@ class PolyhedronObject 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'],
|
||||
lineColor: options.label.lineColor || '#fff000',
|
||||
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,
|
||||
far: (options.label.far || options.label.far === 0) ? options.label.far : 100000,
|
||||
@ -381,7 +381,7 @@ class PolyhedronObject extends Base {
|
||||
return this.options.color
|
||||
}
|
||||
set color(v) {
|
||||
this.options.color = v
|
||||
this.options.color = v || '#ff0000'
|
||||
if(!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) {
|
||||
return
|
||||
}
|
||||
@ -398,7 +398,7 @@ class PolyhedronObject extends Base {
|
||||
el: item.el,
|
||||
size: 'mini',//颜色box类型
|
||||
alpha: true,//是否开启透明度
|
||||
defaultColor: v,
|
||||
defaultColor: this.options.color,
|
||||
disabled: false,//是否禁止打开颜色选择器
|
||||
openPickerAni: 'opacity',//打开颜色选择器动画
|
||||
sure: (c) => {
|
||||
@ -662,7 +662,7 @@ class PolyhedronObject extends Base {
|
||||
this.labelLineColor = color
|
||||
},//点击确认按钮事件回调
|
||||
clear: () => {
|
||||
this.labelLineColor = 'rgba(255,255,255,1)'
|
||||
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||
},//点击清空按钮事件回调
|
||||
})
|
||||
this._elms.labelLineColor[i] = lineColorPicker
|
||||
|
Reference in New Issue
Block a user