diff --git a/src/Obj/Analysis/test2/index.js b/src/Obj/Analysis/test2/index.js index 2f66a01..30606f1 100644 --- a/src/Obj/Analysis/test2/index.js +++ b/src/Obj/Analysis/test2/index.js @@ -62,7 +62,7 @@ class PolygonObject extends Base { 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', + 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, diff --git a/src/Obj/Base/AssembleObject/index.js b/src/Obj/Base/AssembleObject/index.js index 116e350..15146b9 100644 --- a/src/Obj/Base/AssembleObject/index.js +++ b/src/Obj/Base/AssembleObject/index.js @@ -24,7 +24,7 @@ class AssembleObject extends Base { * @param options {object} 属性 * @param options.show=true {boolean} 显示/隐藏 * @param options.name {string} 名称 - * @param options.color="#36c4ff" {string} 颜色 + * @param options.color="#ff000080" {string} 颜色 * @param options.height {number} 高度 * @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式) * @param {Array.} options.positions 坐标数组 [{lon,lat,alt},...] @@ -34,13 +34,13 @@ class AssembleObject extends Base { constructor(sdk, options = {}, _Dialog = {}) { super(sdk, options); this.options.name = options.name || '未命名对象' - this.options.color = options.color || "#36c4ff" + this.options.color = options.color || "#ff000080" this.options.show = (options.show || options.show === false) ? options.show : true this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2 this.options.positions = options.positions || [] this.options.line = options.line || {} - this.options.line.width = this.options.line.width || 2 - this.options.line.color = this.options.line.color || 'rgba(155, 155, 124, 0.89)' + this.options.line.width = ((this.options.line.width || this.options.line.width === 0) ? this.options.line.width : 3) + this.options.line.color = this.options.line.color || '#ff000080' this.options['area-unit'] = options['area-unit'] || '平方米' this.entity this.event = new MouseEvent(this.sdk) @@ -57,8 +57,8 @@ class AssembleObject 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, @@ -106,14 +106,14 @@ class AssembleObject extends Base { return this.options.color } set color(v) { - this.options.color = v + this.options.color = v || '#ff000080' if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) { return } - let material = Cesium.Color.fromCssColorString(v) + let material = Cesium.Color.fromCssColorString(this.options.color) if (this.sdk.viewer.scene.mode === 2) { material = new Cesium.CustomColorMaterialSource({ - color: v + color: this.options.color }) } this.entity.polygon.material = material @@ -123,14 +123,14 @@ class AssembleObject extends Base { el: item.el, size: 'mini',//颜色box类型 alpha: true,//是否开启透明度 - defaultColor: v, + defaultColor: this.options.color, disabled: false,//是否禁止打开颜色选择器 openPickerAni: 'opacity',//打开颜色选择器动画 sure: (c) => { this.color = c },//点击确认按钮事件回调 clear: () => { - this.color = 'rgba(255,255,255,1)' + this.color = 'rgba(255,0,0,0.5)' },//点击清空按钮事件回调 }) this._elms.color[i] = colorPicker @@ -238,25 +238,25 @@ class AssembleObject extends Base { return this.options.line.color } set lineColor(v) { - this.options.line.color = v + this.options.line.color = v || '#ff000080' if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) { return } - this.entity.polyline.material = Cesium.Color.fromCssColorString(v) + this.entity.polyline.material = Cesium.Color.fromCssColorString(this.options.line.color) if (this._elms.lineColor) { this._elms.lineColor.forEach((item, i) => { let lineColorPicker = new ewPlugins('colorpicker', { el: item.el, size: 'mini',//颜色box类型 alpha: true,//是否开启透明度 - defaultColor: v, + defaultColor: this.options.line.color, disabled: false,//是否禁止打开颜色选择器 openPickerAni: 'opacity',//打开颜色选择器动画 sure: (c) => { this.lineColor = c },//点击确认按钮事件回调 clear: () => { - this.lineColor = 'rgba(255,255,255,1)' + this.lineColor = 'rgba(255,0,0,0.5)' },//点击清空按钮事件回调 }) this._elms.lineColor[i] = lineColorPicker @@ -268,10 +268,10 @@ class AssembleObject extends Base { return this.options.line.width } set lineWidth(v) { - this.options.line.width = v - this.entity.polyline.width = v + this.options.line.width = ((v || v === 0) ? v : 3) + this.entity.polyline.width = this.options.line.width this._elms.lineColor && this._elms.lineColor.forEach((item) => { - item.value = v + item.value = this.options.line.width }) } @@ -464,7 +464,7 @@ class AssembleObject 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 diff --git a/src/Obj/Base/AttackArrowObject/index.js b/src/Obj/Base/AttackArrowObject/index.js index 39afd76..f62b71a 100644 --- a/src/Obj/Base/AttackArrowObject/index.js +++ b/src/Obj/Base/AttackArrowObject/index.js @@ -24,7 +24,7 @@ class AttackArrowObject extends Base { * @param options {object} 属性 * @param options.show=true {boolean} 显示/隐藏 * @param options.name {string} 名称 - * @param options.color="#36c4ff" {string} 颜色 + * @param options.color="#ff000080" {string} 颜色 * @param options.height {number} 高度 * @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式) * @param {Array.} options.positions 坐标数组 [{lon,lat,alt},...] @@ -34,13 +34,13 @@ class AttackArrowObject extends Base { constructor(sdk, options = {}, _Dialog = {}) { super(sdk, options); this.options.name = options.name || '未命名对象' - this.options.color = options.color || "#36c4ff" + this.options.color = options.color || "#ff000080" this.options.show = (options.show || options.show === false) ? options.show : true this.options.positions = options.positions || [] this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2 this.options.line = options.line || {} - this.options.line.width = this.options.line.width || 2 - this.options.line.color = this.options.line.color || 'rgba(155, 155, 124, 0.89)' + this.options.line.width = ((this.options.line.width || this.options.line.width === 0) ? this.options.line.width : 3) + this.options.line.color = this.options.line.color || '#ff000080' this.options['area-unit'] = options['area-unit'] || '平方米' this.entity this.event = new MouseEvent(this.sdk) @@ -61,8 +61,8 @@ class AttackArrowObject 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, @@ -110,14 +110,14 @@ class AttackArrowObject extends Base { return this.options.color } set color(v) { - this.options.color = v + this.options.color = v || '#ff000080' if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) { return } - let material = Cesium.Color.fromCssColorString(v) + let material = Cesium.Color.fromCssColorString(this.options.color) if (this.sdk.viewer.scene.mode === 2) { material = new Cesium.CustomColorMaterialSource({ - color: v + color: this.options.color }) } this.entity.polygon.material = material @@ -127,14 +127,14 @@ class AttackArrowObject extends Base { el: item.el, size: 'mini',//颜色box类型 alpha: true,//是否开启透明度 - defaultColor: v, + defaultColor: this.options.color, disabled: false,//是否禁止打开颜色选择器 openPickerAni: 'opacity',//打开颜色选择器动画 sure: (c) => { this.color = c },//点击确认按钮事件回调 clear: () => { - this.color = 'rgba(255,255,255,1)' + this.color = 'rgba(255,0,0,0.5)' },//点击清空按钮事件回调 }) this._elms.color[i] = colorPicker @@ -243,25 +243,25 @@ class AttackArrowObject extends Base { return this.options.line.color } set lineColor(v) { - this.options.line.color = v + this.options.line.color = v || '#ff000080' if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) { return } - this.entity.polyline.material = Cesium.Color.fromCssColorString(v) + this.entity.polyline.material = Cesium.Color.fromCssColorString(this.options.line.color) if (this._elms.lineColor) { this._elms.lineColor.forEach((item, i) => { let lineColorPicker = new ewPlugins('colorpicker', { el: item.el, size: 'mini',//颜色box类型 alpha: true,//是否开启透明度 - defaultColor: v, + defaultColor: this.options.line.color, disabled: false,//是否禁止打开颜色选择器 openPickerAni: 'opacity',//打开颜色选择器动画 sure: (c) => { this.lineColor = c },//点击确认按钮事件回调 clear: () => { - this.lineColor = 'rgba(255,255,255,1)' + this.lineColor = 'rgba(255,0,0,0.5)' },//点击清空按钮事件回调 }) this._elms.lineColor[i] = lineColorPicker @@ -273,8 +273,8 @@ class AttackArrowObject extends Base { return this.options.line.width } set lineWidth(v) { - this.options.line.width = v - this.entity.polyline.width = v + this.options.line.width = ((v || v === 0) ? v : 3) + this.entity.polyline.width = this.options.line.width this._elms.lineColor && this._elms.lineColor.forEach((item) => { item.value = v }) @@ -469,7 +469,7 @@ class AttackArrowObject 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 diff --git a/src/Obj/Base/BaseSource/BaseModel/Model/index.js b/src/Obj/Base/BaseSource/BaseModel/Model/index.js index a6e8d08..8fab708 100644 --- a/src/Obj/Base/BaseSource/BaseModel/Model/index.js +++ b/src/Obj/Base/BaseSource/BaseModel/Model/index.js @@ -100,8 +100,8 @@ class Model extends BaseModel { 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, @@ -791,7 +791,7 @@ class Model extends BaseModel { this.labelLineColor = color },//点击确认按钮事件回调 clear: () => { - this.labelLineColor = 'rgba(255,255,255,1)' + this.labelLineColor = 'rgba(0,255,255,0.5)' },//点击清空按钮事件回调 }) this._elms.labelLineColor[i] = lineColorPicker diff --git a/src/Obj/Base/BillboardObject/index.js b/src/Obj/Base/BillboardObject/index.js index eab4a3d..5442879 100644 --- a/src/Obj/Base/BillboardObject/index.js +++ b/src/Obj/Base/BillboardObject/index.js @@ -63,9 +63,9 @@ class BillboardObject extends Base { *@param options.label {object} 标注文字的参数 *@param [options.label.text] {string} 标注中文字 *@param [options.label.show=true] {boolean} 标注文字显示/隐藏 - *@param [options.label.fontFamily=0] {number} 标注文字字体 0:思源黑体;1:庞门正道标题体;2:数黑体 + *@param [options.label.fontFamily=0] {number} 标注文字字体 0:黑体;1:思源黑体;2:庞门正道标题体;3:数黑体 *@param [options.label.fontSize=39] {number} 标注文字大小 单位px,微软雅黑 - *@param [options.label.color=#07f8e4] {string} 标注文字颜色 + *@param [options.label.color=#00ffff] {string} 标注文字颜色 *@param _Dialog {object} 弹框事件 *@param _Dialog.confirmCallBack {function} 弹框确认时的回调 *@param _Dialog.instructSubmit(id,name,instruct) {function} 提交指令(ID, 名称,指令内容) @@ -107,7 +107,7 @@ class BillboardObject extends Base { : true this.options.label.fontFamily = options.label.fontFamily || 0 this.options.label.fontSize = options.label.fontSize || 39 - this.options.label.color = options.label.color || '#FFFF00' + this.options.label.color = options.label.color || '#00ffff' this.options.positions = options.positions = options.positions || {} this.options.positions.lng = Number( Number(options.positions.lng || 0).toFixed(8) @@ -916,7 +916,7 @@ class BillboardObject extends Base { return this.options.label.color } set labelColor(v) { - this.options.label.color = v + this.options.label.color = v || '#00ffff' this.renewPoint() if (this._elms.labelColor) { this._elms.labelColor.forEach((item, i) => { @@ -924,14 +924,14 @@ class BillboardObject extends Base { el: item.el, size: 'mini', //颜色box类型 alpha: true, //是否开启透明度 - defaultColor: v, + defaultColor: this.options.label.color, disabled: false, //是否禁止打开颜色选择器 openPickerAni: 'opacity', //打开颜色选择器动画 sure: c => { this.labelColor = c }, //点击确认按钮事件回调 clear: () => { - this.labelColor = 'rgba(255,255,255,1)' + this.labelColor = 'rgba(0,255,255,1)' } //点击清空按钮事件回调 }) this._elms.labelColor[i] = colorPicker diff --git a/src/Obj/Base/CircleDiffuse/index.js b/src/Obj/Base/CircleDiffuse/index.js index 295093e..797ed93 100644 --- a/src/Obj/Base/CircleDiffuse/index.js +++ b/src/Obj/Base/CircleDiffuse/index.js @@ -75,8 +75,8 @@ class CircleDiffuse 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, @@ -573,7 +573,7 @@ class CircleDiffuse 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 diff --git a/src/Obj/Base/CircleObject/index.js b/src/Obj/Base/CircleObject/index.js index a3dbd21..8822293 100644 --- a/src/Obj/Base/CircleObject/index.js +++ b/src/Obj/Base/CircleObject/index.js @@ -23,7 +23,7 @@ class CircleObject extends Base { * @param options.id {string} 标注id * @param options.name {string} 名称 * @param options.show=true {boolean} 显示/隐藏 - * @param options.color="#36c4ff" {string} 颜色 + * @param options.color="#ff000080" {string} 颜色 * @param options.center {object} 位置 * @param options.center.lng {object} 经度 * @param options.center.lat {object} 纬度 @@ -31,21 +31,21 @@ class CircleObject extends Base { * @param options.radius=10 {object}半径 * @param options.line {object} 边框 * @param options.line.width=2 {string} 边框宽 - * @param options.line.color="rgba(155, 155, 124, 0.89)" {string} 边框颜色 + * @param options.line.color="#ff000080" {string} 边框颜色 * @param options.label {object} 标注 * @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式) */ constructor(sdk, options = {}) { super(sdk, options); this.options.name = options.name || '未命名对象' - this.options.color = options.color || "#36c4ff" + this.options.color = options.color || "#ff000080" this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2 this.options.radius = (options.radius || options.radius === 0) ? options.radius : 10 this.options.show = (options.show || options.show === false) ? options.show : true this.options.center = options.center || {} this.options.line = options.line || {} - this.options.line.width = this.options.line.width || 2 - this.options.line.color = this.options.line.color || 'rgba(155, 155, 124, 0.89)' + this.options.line.width = ((this.options.line.width || this.options.line.width === 0) ? this.options.line.width : 3) + this.options.line.color = this.options.line.color || '#ff000080' this.options['area-unit'] = options['area-unit'] || '平方米' options.label = options.label || {} this._elms = {}; @@ -58,8 +58,8 @@ class CircleObject 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, @@ -216,14 +216,14 @@ class CircleObject extends Base { return this.options.color } set color(v) { - this.options.color = v + this.options.color = v || '#ff000080' if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) { return } - let material = Cesium.Color.fromCssColorString(v) + let material = Cesium.Color.fromCssColorString(this.options.color) if (this.sdk.viewer.scene.mode === 2) { material = new Cesium.CustomColorMaterialSource({ - color: v + color: this.options.color }) } this.entity.polygon.material = material @@ -233,14 +233,14 @@ class CircleObject extends Base { el: item.el, size: 'mini',//颜色box类型 alpha: true,//是否开启透明度 - defaultColor: v, + defaultColor: this.options.color, disabled: false,//是否禁止打开颜色选择器 openPickerAni: 'opacity',//打开颜色选择器动画 sure: (c) => { this.color = c },//点击确认按钮事件回调 clear: () => { - this.color = 'rgba(255,255,255,1)' + this.color = 'rgba(255,0,0,0.5)' },//点击清空按钮事件回调 }) this._elms.color[i] = colorPicker @@ -252,25 +252,25 @@ class CircleObject extends Base { return this.options.line.color } set lineColor(v) { - this.options.line.color = v + this.options.line.color = v || '#ff000080' if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) { return } - this.entity.polyline.material = Cesium.Color.fromCssColorString(v) + this.entity.polyline.material = Cesium.Color.fromCssColorString(this.options.line.color) if (this._elms.lineColor) { this._elms.lineColor.forEach((item, i) => { let lineColorPicker = new ewPlugins('colorpicker', { el: item.el, size: 'mini',//颜色box类型 alpha: true,//是否开启透明度 - defaultColor: v, + defaultColor: this.options.line.color, disabled: false,//是否禁止打开颜色选择器 openPickerAni: 'opacity',//打开颜色选择器动画 sure: (c) => { this.lineColor = c },//点击确认按钮事件回调 clear: () => { - this.lineColor = 'rgba(255,255,255,1)' + this.lineColor = 'rgba(255,0,0,0.5)' },//点击清空按钮事件回调 }) this._elms.lineColor[i] = lineColorPicker @@ -282,8 +282,8 @@ class CircleObject extends Base { return this.options.line.width } set lineWidth(v) { - this.options.line.width = v - this.entity.polyline.width = v + this.options.line.width = ((v || v === 0) ? v : 3) + this.entity.polyline.width = this.options.line.width this._elms.lineWidth && this._elms.lineWidth.forEach((item) => { item.value = v }) @@ -478,7 +478,7 @@ class CircleObject 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 diff --git a/src/Obj/Base/CurvelineObject/index.js b/src/Obj/Base/CurvelineObject/index.js index 5b08237..b3f3c3e 100644 --- a/src/Obj/Base/CurvelineObject/index.js +++ b/src/Obj/Base/CurvelineObject/index.js @@ -24,8 +24,8 @@ class CurvelineObject extends Base { * @description 折线 * @param options {object} 线属性 * @param options.name{string} 名称 - * @param options.width=5{number} 线宽 - * @param options.color=#0df89e {string} 颜色 + * @param options.width=3{number} 线宽 + * @param options.color=#ff0000 {string} 颜色 * @param options.type=0 {number} 材质类型 0-实线 1-虚线 2-泛光 * @param options.heightMode{number} 高度模式(0:海拔高度;1:相对高度;2:依附模式) * @param options['nose-to-tail']=false {boolean} 首尾相连 @@ -51,8 +51,8 @@ class CurvelineObject extends Base { constructor(sdk, options = {}, _Dialog = {}) { super(sdk, options) this.options.name = options.name || '未命名对象' - this.options.width = options.width || 10 - this.options.color = options.color || '#0df89e' + this.options.width = ((options.width || options.width === 0) ? options.width : 3) + this.options.color = options.color || '#ff0000' this.options.type = options.type ? Number(options.type) : 0 this.options['nose-to-tail'] = options['nose-to-tail'] || false this.options.extend = options.extend || false @@ -86,8 +86,8 @@ class CurvelineObject extends Base { 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 @@ -143,7 +143,7 @@ class CurvelineObject extends Base { return this.options.color } set color(v) { - this.options.color = v + this.options.color = v || '#ff0000' this.entity.polyline.material = this.getMaterial(v, this.options.type) if (this._elms.color) { this._elms.color.forEach((item, i) => { @@ -151,14 +151,14 @@ class CurvelineObject extends Base { el: item.el, size: 'mini', //颜色box类型 alpha: true, //是否开启透明度 - defaultColor: v, + defaultColor: this.options.color, disabled: false, //是否禁止打开颜色选择器 openPickerAni: 'opacity', //打开颜色选择器动画 sure: c => { this.color = c }, //点击确认按钮事件回调 clear: () => { - this.color = 'rgba(255,255,255,1)' + this.color = 'rgba(255,0,0,1)' } //点击清空按钮事件回调 }) this._elms.color[i] = colorPicker @@ -243,10 +243,10 @@ class CurvelineObject extends Base { } set lineWidth(v) { - this.options.width = v + this.options.width = (v || v == 0) ? v : 3 this._elms.lineWidth && this._elms.lineWidth.forEach(item => { - item.value = v + item.value = this.options.width }) this.entity && this.entity.polyline && @@ -623,7 +623,7 @@ class CurvelineObject 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 diff --git a/src/Obj/Base/EllipseObject/index.js b/src/Obj/Base/EllipseObject/index.js index 02272c6..ff30a6b 100644 --- a/src/Obj/Base/EllipseObject/index.js +++ b/src/Obj/Base/EllipseObject/index.js @@ -1,5 +1,5 @@ /** - * 圆 + * 椭圆 */ import Dialog from '../../Element/Dialog'; import cy_tabs from "../../Element/cy_html_tabs"; @@ -24,7 +24,7 @@ class EllipseObject extends Base { * @param options.name {string} 名称 * @param options.show=true {boolean} 显示/隐藏 * @param options.center {object} 位置 - * @param options.color="#36c4ff" {string} 颜色 + * @param options.color="#ff000080" {string} 颜色 * @param options.center.lng {object} 经度 * @param options.center.lat {object} 维度 * @param options.semiMinorAxis=10 {number} 短半轴长度 @@ -32,22 +32,22 @@ class EllipseObject extends Base { * @param options.bearing=0 {number} 旋转角度 * @param options.line {object} 边框 * @param options.line.width=2 {string} 边框宽 - * @param options.line.color="rgba(155, 155, 124, 0.89)" {string} 边框颜色 + * @param options.line.color="#ff000080" {string} 边框颜色 * @param options.label {object} 标注 * @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式) */ constructor(sdk, options = {}) { super(sdk, options); this.options.name = options.name || '未命名对象' - this.options.color = options.color || "#36c4ff" + this.options.color = options.color || "#ff000080" this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2 this.options.semiMinorAxis = (options.semiMinorAxis || options.semiMinorAxis === 0) ? options.semiMinorAxis : 10 this.options.semiMajorAxis = (options.semiMajorAxis || options.semiMajorAxis === 0) ? options.semiMajorAxis : 20 this.options.show = (options.show || options.show === false) ? options.show : true this.options.center = options.center || {} this.options.line = options.line || {} - this.options.line.width = this.options.line.width || 2 - this.options.line.color = this.options.line.color || 'rgba(155, 155, 124, 0.89)' + this.options.line.width = ((this.options.line.width || this.options.line.width === 0) ? this.options.line.width : 3) + this.options.line.color = this.options.line.color || '#ff000080' this.options['area-unit'] = options['area-unit'] || '平方米' options.label = options.label || {} this._elms = {}; @@ -60,8 +60,8 @@ class EllipseObject 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, @@ -229,14 +229,14 @@ class EllipseObject extends Base { return this.options.color } set color(v) { - this.options.color = v + this.options.color = v || '#ff000080' if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) { return } - let material = Cesium.Color.fromCssColorString(v) + let material = Cesium.Color.fromCssColorString(this.options.color) if (this.sdk.viewer.scene.mode === 2) { material = new Cesium.CustomColorMaterialSource({ - color: v + color: this.options.color }) } this.entity.polygon.material = material @@ -247,14 +247,14 @@ class EllipseObject extends Base { el: item.el, size: 'mini',//颜色box类型 alpha: true,//是否开启透明度 - defaultColor: v, + defaultColor: this.options.color, disabled: false,//是否禁止打开颜色选择器 openPickerAni: 'opacity',//打开颜色选择器动画 sure: (c) => { this.color = c },//点击确认按钮事件回调 clear: () => { - this.color = 'rgba(255,255,255,1)' + this.color = 'rgba(255,0,0,0.5)' },//点击清空按钮事件回调 }) this._elms.color[i] = colorPicker @@ -266,25 +266,25 @@ class EllipseObject extends Base { return this.options.line.color } set lineColor(v) { - this.options.line.color = v + this.options.line.color = v || '#ff000080' if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) { return } - this.entity.polyline.material = Cesium.Color.fromCssColorString(v) + this.entity.polyline.material = Cesium.Color.fromCssColorString(this.options.line.color) if (this._elms.lineColor) { this._elms.lineColor.forEach((item, i) => { let lineColorPicker = new ewPlugins('colorpicker', { el: item.el, size: 'mini',//颜色box类型 alpha: true,//是否开启透明度 - defaultColor: v, + defaultColor: this.options.line.color, disabled: false,//是否禁止打开颜色选择器 openPickerAni: 'opacity',//打开颜色选择器动画 sure: (c) => { this.lineColor = c },//点击确认按钮事件回调 clear: () => { - this.lineColor = 'rgba(255,255,255,1)' + this.lineColor = 'rgba(255,0,0,0.5)' },//点击清空按钮事件回调 }) this._elms.lineColor[i] = lineColorPicker @@ -296,10 +296,10 @@ class EllipseObject extends Base { return this.options.line.width } set lineWidth(v) { - this.options.line.width = v - this.entity.polyline.width = v + this.options.line.width = ((v || v === 0) ? v : 3) + this.entity.polyline.width = this.options.line.width this._elms.lineWidth && this._elms.lineWidth.forEach((item) => { - item.value = v + item.value = this.options.line.width }) } @@ -492,7 +492,7 @@ class EllipseObject 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 diff --git a/src/Obj/Base/LabelObject/index.js b/src/Obj/Base/LabelObject/index.js index 5cf45d4..25adf1d 100644 --- a/src/Obj/Base/LabelObject/index.js +++ b/src/Obj/Base/LabelObject/index.js @@ -34,10 +34,10 @@ class LabelObject extends Base { } this.options.text = textArray.join('\n') this.options.fontFamily = options.fontFamily || 0 - this.font = getFontFamily(this.options.fontFamily) || 'Helvetica' + this.font = getFontFamily(this.options.fontFamily) || 'SimHei' this.options.fontSize = options.fontSize || 20 this.options.lineWidth = options.lineWidth || 4 - this.options.lineColor = options.lineColor || '#fff000' + this.options.lineColor = options.lineColor || '#00ffff80' this.options.color = options.color || '#ffffff' this.options.ground = options.ground || options.ground === false ? options.ground : true @@ -46,8 +46,8 @@ class LabelObject extends Base { ? options.pixelOffset : 20 this.options.backgroundColor = options.backgroundColor || [ - '#42c6ef', - '#42c6ef' + '#00ffff80', + '#00ffff80' ] this.event = new MouseEvent(this.sdk) this.entity @@ -407,7 +407,7 @@ class LabelObject extends Base { set fontFamily(v) { this.options.fontFamily = v || 0 - this.font = getFontFamily(this.options.fontFamily) || 'Helvetica' + this.font = getFontFamily(this.options.fontFamily) || 'SimHei' this.updateBillboardImage() } @@ -415,7 +415,7 @@ class LabelObject extends Base { return this.options.lineWidth } set lineWidth(v) { - this.options.lineWidth = Number(v) + this.options.lineWidth = ((Number(v) || Number(v) === 0) ? Number(v) : 4) if (!this.entity) { return } @@ -443,7 +443,7 @@ class LabelObject extends Base { return this.options.pixelOffset } set lineColor(v) { - this.options.lineColor = v + this.options.lineColor = v || '#00ffff80' if (!this.entity) { return } diff --git a/src/Obj/Base/PincerArrowObject/index.js b/src/Obj/Base/PincerArrowObject/index.js index c8b57b5..38e0580 100644 --- a/src/Obj/Base/PincerArrowObject/index.js +++ b/src/Obj/Base/PincerArrowObject/index.js @@ -24,7 +24,7 @@ class PincerArrowObject extends Base { * @param options {object} 属性 * @param options.show=true {boolean} 显示/隐藏 * @param options.name {string} 名称 - * @param options.color="#36c4ff" {string} 颜色 + * @param options.color="#ff000080" {string} 颜色 * @param options.height {number} 高度 * @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式) * @param {Array.} options.positions 坐标数组 [{lon,lat,alt},...] @@ -34,13 +34,13 @@ class PincerArrowObject extends Base { constructor(sdk, options = {}, _Dialog = {}) { super(sdk, options); this.options.name = options.name || '未命名对象' - this.options.color = options.color || "#36c4ff" + this.options.color = options.color || "#ff000080" this.options.show = (options.show || options.show === false) ? options.show : true this.options.positions = options.positions || [] this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2 this.options.line = options.line || {} - this.options.line.width = this.options.line.width || 2 - this.options.line.color = this.options.line.color || 'rgba(155, 155, 124, 0.89)' + this.options.line.width = ((this.options.line.width || this.options.line.width === 0) ? this.options.line.width : 3) + this.options.line.color = this.options.line.color || '#ff000080' this.options['area-unit'] = options['area-unit'] || '平方米' this.options.height = options.height this.options.loop = options.loop || false @@ -62,8 +62,8 @@ class PincerArrowObject 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, @@ -122,14 +122,14 @@ class PincerArrowObject extends Base { return this.options.color } set color(v) { - this.options.color = v + this.options.color = v || '#ff000080' if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) { return } - let material = Cesium.Color.fromCssColorString(v) + let material = Cesium.Color.fromCssColorString(this.options.color) if (this.sdk.viewer.scene.mode === 2) { material = new Cesium.CustomColorMaterialSource({ - color: v + color: this.options.color }) } this.entity.polygon.material = material @@ -139,14 +139,14 @@ class PincerArrowObject extends Base { el: item.el, size: 'mini',//颜色box类型 alpha: true,//是否开启透明度 - defaultColor: v, + defaultColor: this.options.color, disabled: false,//是否禁止打开颜色选择器 openPickerAni: 'opacity',//打开颜色选择器动画 sure: (c) => { this.color = c },//点击确认按钮事件回调 clear: () => { - this.color = 'rgba(255,255,255,1)' + this.color = 'rgba(255,0,0,0.5)' },//点击清空按钮事件回调 }) this._elms.color[i] = colorPicker @@ -253,25 +253,25 @@ class PincerArrowObject extends Base { return this.options.line.color } set lineColor(v) { - this.options.line.color = v + this.options.line.color = v || '#ff000080' if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) { return } - this.entity.polyline.material = Cesium.Color.fromCssColorString(v) + this.entity.polyline.material = Cesium.Color.fromCssColorString(this.options.line.color) if (this._elms.lineColor) { this._elms.lineColor.forEach((item, i) => { let lineColorPicker = new ewPlugins('colorpicker', { el: item.el, size: 'mini',//颜色box类型 alpha: true,//是否开启透明度 - defaultColor: v, + defaultColor: this.options.line.color, disabled: false,//是否禁止打开颜色选择器 openPickerAni: 'opacity',//打开颜色选择器动画 sure: (c) => { this.lineColor = c },//点击确认按钮事件回调 clear: () => { - this.lineColor = 'rgba(255,255,255,1)' + this.lineColor = 'rgba(255,0,0,0.5)' },//点击清空按钮事件回调 }) this._elms.lineColor[i] = lineColorPicker @@ -283,10 +283,10 @@ class PincerArrowObject extends Base { return this.options.line.width } set lineWidth(v) { - this.options.line.width = v - this.entity.polyline.width = v + this.options.line.width = ((v || v === 0) ? v : 3) + this.entity.polyline.width = this.options.line.width this._elms.lineWidth && this._elms.lineWidth.forEach((item) => { - item.value = v + item.value = this.options.line.width }) } @@ -479,7 +479,7 @@ class PincerArrowObject 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 diff --git a/src/Obj/Base/PolygonObject/index.js b/src/Obj/Base/PolygonObject/index.js index ac14c22..fcb4f10 100644 --- a/src/Obj/Base/PolygonObject/index.js +++ b/src/Obj/Base/PolygonObject/index.js @@ -25,7 +25,7 @@ class PolygonObject extends Base { * @param options.id {string} 唯一标识 * @param options.show=true {boolean} 显示/隐藏 * @param options.name {string} 名称 - * @param options.color="#36c4ff" {string} 颜色 + * @param options.color="#ff000080" {string} 颜色 * @param options.height {number} 高度 * @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式) * @param options.line {object} 边框 @@ -39,15 +39,15 @@ class PolygonObject extends Base { constructor(sdk, options = {}, _Dialog = {}) { super(sdk, options) this.options.name = options.name || '未命名对象' - this.options.color = options.color || '#36c4ff' + this.options.color = options.color || '#ff000080' this.options.show = options.show || options.show === false ? options.show : true this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2 this.options.positions = options.positions || [] this.options.line = options.line || {} - this.options.line.width = this.options.line.width || 2 + this.options.line.width = ((this.options.line.width || this.options.line.width === 0) ? this.options.line.width : 3) this.options.line.color = - this.options.line.color || 'rgba(155, 155, 124, 0.89)' + this.options.line.color || '#ff000080' this.options['area-unit'] = options['area-unit'] || '平方米' this.entity this.event = new MouseEvent(this.sdk) @@ -74,8 +74,8 @@ class PolygonObject extends Base { 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 @@ -133,18 +133,18 @@ class PolygonObject extends Base { return this.options.color } set color(v) { - this.options.color = v + this.options.color = v || '#ff000080' if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) { return } if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) { return } - let material = Cesium.Color.fromCssColorString(v) + let material = Cesium.Color.fromCssColorString(this.options.color) if (this.sdk.viewer.scene.mode === 2) { this.heightMode = 0 material = new Cesium.CustomColorMaterialSource({ - color: v + color: this.options.color }) } this.entity.polygon.material = material @@ -154,14 +154,14 @@ class PolygonObject extends Base { el: item.el, size: 'mini', //颜色box类型 alpha: true, //是否开启透明度 - defaultColor: v, + defaultColor: this.options.color, disabled: false, //是否禁止打开颜色选择器 openPickerAni: 'opacity', //打开颜色选择器动画 sure: c => { this.color = c }, //点击确认按钮事件回调 clear: () => { - this.color = 'rgba(255,255,255,1)' + this.color = 'rgba(255,0,0,0.5)' } //点击清空按钮事件回调 }) this._elms.color[i] = colorPicker @@ -269,25 +269,25 @@ class PolygonObject extends Base { return this.options.line.color } set lineColor(v) { - this.options.line.color = v + this.options.line.color = v || '#ff000080' if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) { return } - this.entity.polyline.material = Cesium.Color.fromCssColorString(v) + this.entity.polyline.material = Cesium.Color.fromCssColorString(this.options.line.color) if (this._elms.lineColor) { this._elms.lineColor.forEach((item, i) => { let lineColorPicker = new ewPlugins('colorpicker', { el: item.el, size: 'mini', //颜色box类型 alpha: true, //是否开启透明度 - defaultColor: v, + defaultColor: this.options.line.color, disabled: false, //是否禁止打开颜色选择器 openPickerAni: 'opacity', //打开颜色选择器动画 sure: c => { this.lineColor = c }, //点击确认按钮事件回调 clear: () => { - this.lineColor = 'rgba(255,255,255,1)' + this.lineColor = 'rgba(255,0,0,0.5)' } //点击清空按钮事件回调 }) this._elms.lineColor[i] = lineColorPicker @@ -299,8 +299,8 @@ class PolygonObject extends Base { return this.options.line.width } set lineWidth(v) { - this.options.line.width = v - this.entity.polyline.width = v + this.options.line.width = ((v || v === 0) ? v : 3) + this.entity.polyline.width = this.options.line.width this._elms.lineWidth && this._elms.lineWidth.forEach(item => { item.value = v @@ -504,7 +504,7 @@ class PolygonObject 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 diff --git a/src/Obj/Base/PolyhedronObject/index.js b/src/Obj/Base/PolyhedronObject/index.js index e5124f7..b880b7e 100644 --- a/src/Obj/Base/PolyhedronObject/index.js +++ b/src/Obj/Base/PolyhedronObject/index.js @@ -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.} 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 diff --git a/src/Obj/Base/PolyhedronObject2/index.js b/src/Obj/Base/PolyhedronObject2/index.js index e59497f..bea9c99 100644 --- a/src/Obj/Base/PolyhedronObject2/index.js +++ b/src/Obj/Base/PolyhedronObject2/index.js @@ -53,8 +53,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, @@ -599,7 +599,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 diff --git a/src/Obj/Base/PolylineObject/index.js b/src/Obj/Base/PolylineObject/index.js index 5317663..d070872 100644 --- a/src/Obj/Base/PolylineObject/index.js +++ b/src/Obj/Base/PolylineObject/index.js @@ -24,8 +24,8 @@ class PolylineObject extends Base { * @description 折线 * @param options {object} 线属性 * @param options.name{string} 名称 - * @param options.width=5{number} 线宽 - * @param options.color=#0df89e {string} 颜色 + * @param options.width=3{number} 线宽 + * @param options.color=#ff0000 {string} 颜色 * @param options.type=0 {number} 材质类型 0-实线 1-虚线 2-泛光 * @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对高度;2:依附模式) * @param options['nose-to-tail']=false {boolean} 首尾相连 @@ -52,8 +52,8 @@ class PolylineObject extends Base { constructor(sdk, options = {}, _Dialog = {}) { super(sdk, options) this.options.name = options.name || '未命名对象' - this.options.width = options.width || 10 - this.options.color = options.color || '#0df89e' + this.options.width = ((options.width || options.width === 0) ? options.width : 3) + this.options.color = options.color || '#ff0000' this.options.type = options.type ? Number(options.type) : 0 this.options['nose-to-tail'] = options['nose-to-tail'] || false this.options.smooth = options.smooth || false @@ -88,8 +88,8 @@ class PolylineObject extends Base { 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 @@ -145,22 +145,22 @@ class PolylineObject extends Base { return this.options.color } set color(v) { - this.options.color = v - this.entity.polyline.material = this.getMaterial(v, this.options.type) + this.options.color = v || '#ff0000' + this.entity.polyline.material = this.getMaterial(this.options.color, this.options.type) if (this._elms.color) { this._elms.color.forEach((item, i) => { let colorPicker = new ewPlugins('colorpicker', { el: item.el, size: 'mini', //颜色box类型 alpha: true, //是否开启透明度 - defaultColor: v, + defaultColor: this.options.color, disabled: false, //是否禁止打开颜色选择器 openPickerAni: 'opacity', //打开颜色选择器动画 sure: c => { this.color = c }, //点击确认按钮事件回调 clear: () => { - this.color = 'rgba(255,255,255,1)' + this.color = 'rgba(255,0,0,1)' } //点击清空按钮事件回调 }) this._elms.color[i] = colorPicker @@ -245,10 +245,10 @@ class PolylineObject extends Base { } set lineWidth(v) { - this.options.width = v + this.options.width = (v || v == 0) ? v : 3 this._elms.lineWidth && this._elms.lineWidth.forEach(item => { - item.value = v + item.value = this.options.width }) this.entity && this.entity.polyline && @@ -645,7 +645,7 @@ class PolylineObject 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 diff --git a/src/Obj/Base/RadarScan/index.js b/src/Obj/Base/RadarScan/index.js index deeb18e..5e6d16e 100644 --- a/src/Obj/Base/RadarScan/index.js +++ b/src/Obj/Base/RadarScan/index.js @@ -53,8 +53,8 @@ class RadarScan 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, @@ -594,7 +594,7 @@ class RadarScan 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 diff --git a/src/Obj/Base/RadarScanStereoscopic/index.js b/src/Obj/Base/RadarScanStereoscopic/index.js index 605a9d6..935025f 100644 --- a/src/Obj/Base/RadarScanStereoscopic/index.js +++ b/src/Obj/Base/RadarScanStereoscopic/index.js @@ -58,8 +58,8 @@ class RadarScanStereoscopic 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, @@ -569,7 +569,7 @@ class RadarScanStereoscopic 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 diff --git a/src/Obj/Base/SectorObject/index.js b/src/Obj/Base/SectorObject/index.js index 1478388..ee649fe 100644 --- a/src/Obj/Base/SectorObject/index.js +++ b/src/Obj/Base/SectorObject/index.js @@ -23,7 +23,7 @@ class SectorObject extends Base { * @param options.id {string} 标注id * @param options.name {string} 名称 * @param options.show=true {boolean} 显示/隐藏 - * @param options.color="#36c4ff" {string} 颜色 + * @param options.color="#ff000080" {string} 颜色 * @param options.center {object} 位置 * @param options.center.lng {object} 经度 * @param options.center.lat {object} 维度 @@ -31,7 +31,7 @@ class SectorObject extends Base { * @param options.startAngle=10 {number} 起始方向 * @param options.endAngle=0 {number} 结束方向 * @param options.line {object} 边框 - * @param options.line.width=2 {string} 边框宽 + * @param options.line.width=3 {string} 边框宽 * @param options.line.color="rgba(155, 155, 124, 0.89)" {string} 边框颜色 * @param options.label {object} 标注 * @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式) @@ -39,15 +39,15 @@ class SectorObject extends Base { constructor(sdk, options = {}) { super(sdk, options); this.options.name = options.name || '未命名对象' - this.options.color = options.color || "#36c4ff" + this.options.color = options.color || "#ff000080" this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2 this.options.semiMinorAxis = (options.semiMinorAxis || options.semiMinorAxis === 0) ? options.semiMinorAxis : 10 this.options.semiMajorAxis = (options.semiMajorAxis || options.semiMajorAxis === 0) ? options.semiMajorAxis : 20 this.options.show = (options.show || options.show === false) ? options.show : true this.options.center = options.center || {} this.options.line = options.line || {} - this.options.line.width = this.options.line.width || 2 - this.options.line.color = this.options.line.color || 'rgba(155, 155, 124, 0.89)' + this.options.line.width = ((this.options.line.width || this.options.line.width === 0) ? this.options.line.width : 3) + this.options.line.color = this.options.line.color || '#ff000080' this.options['area-unit'] = options['area-unit'] || '平方米' options.label = options.label || {} this._elms = {}; @@ -60,8 +60,8 @@ class SectorObject 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, @@ -226,14 +226,14 @@ class SectorObject extends Base { return this.options.color } set color(v) { - this.options.color = v + this.options.color = v || '#ff000080' if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) { return } - let material = Cesium.Color.fromCssColorString(v) + let material = Cesium.Color.fromCssColorString(this.options.color) if (this.sdk.viewer.scene.mode === 2) { material = new Cesium.CustomColorMaterialSource({ - color: v + color: this.options.color }) } this.entity.polygon.material = material @@ -244,14 +244,14 @@ class SectorObject extends Base { el: item.el, size: 'mini',//颜色box类型 alpha: true,//是否开启透明度 - defaultColor: v, + defaultColor: this.options.color, disabled: false,//是否禁止打开颜色选择器 openPickerAni: 'opacity',//打开颜色选择器动画 sure: (c) => { this.color = c },//点击确认按钮事件回调 clear: () => { - this.color = 'rgba(255,255,255,1)' + this.color = 'rgba(255,0,0,0.5)' },//点击清空按钮事件回调 }) this._elms.color[i] = colorPicker @@ -263,25 +263,25 @@ class SectorObject extends Base { return this.options.line.color } set lineColor(v) { - this.options.line.color = v + this.options.line.color = v || '#ff000080' if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polyline) { return } - this.entity.polyline.material = Cesium.Color.fromCssColorString(v) + this.entity.polyline.material = Cesium.Color.fromCssColorString(this.options.line.color) if (this._elms.lineColor) { this._elms.lineColor.forEach((item, i) => { let lineColorPicker = new ewPlugins('colorpicker', { el: item.el, size: 'mini',//颜色box类型 alpha: true,//是否开启透明度 - defaultColor: v, + defaultColor: this.options.line.color, disabled: false,//是否禁止打开颜色选择器 openPickerAni: 'opacity',//打开颜色选择器动画 sure: (c) => { this.lineColor = c },//点击确认按钮事件回调 clear: () => { - this.lineColor = 'rgba(255,255,255,1)' + this.lineColor = 'rgba(255,0,0,0.5)' },//点击清空按钮事件回调 }) this._elms.lineColor[i] = lineColorPicker @@ -293,10 +293,10 @@ class SectorObject extends Base { return this.options.line.width } set lineWidth(v) { - this.options.line.width = v - this.entity.polyline.width = v + this.options.line.width = ((v || v === 0) ? v : 3) + this.entity.polyline.width = this.options.line.width this._elms.lineWidth && this._elms.lineWidth.forEach((item) => { - item.value = v + item.value = this.options.line.width }) } @@ -489,7 +489,7 @@ class SectorObject 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 diff --git a/src/Obj/Base/StraightArrowObject/index.js b/src/Obj/Base/StraightArrowObject/index.js index 98d48ea..4600f4d 100644 --- a/src/Obj/Base/StraightArrowObject/index.js +++ b/src/Obj/Base/StraightArrowObject/index.js @@ -24,7 +24,7 @@ class StraightArrowObject extends Base { * @param options {object} 属性 * @param options.show=true {boolean} 显示/隐藏 * @param options.name {string} 名称 - * @param options.color="#36c4ff" {string} 颜色 + * @param options.color="#ff000080" {string} 颜色 * @param options.height {number} 高度 * @param options.heightMode=2{number} 高度模式(0:海拔高度;1:相对地表;2:依附模式) * @param {Array.} options.positions 坐标数组 [{lon,lat,alt},...] @@ -34,13 +34,13 @@ class StraightArrowObject extends Base { constructor(sdk, options = {}, _Dialog = {}) { super(sdk, options); this.options.name = options.name || '未命名对象' - this.options.color = options.color || "#36c4ff" + this.options.color = options.color || "#ff000080" this.options.show = (options.show || options.show === false) ? options.show : true this.options.heightMode = (options.heightMode || options.heightMode == 0) ? options.heightMode : 2 this.options.positions = options.positions || [] this.options.line = options.line || {} - this.options.line.width = this.options.line.width || 2 - this.options.line.color = this.options.line.color || 'rgba(155, 155, 124, 0.89)' + this.options.line.width = ((this.options.line.width || this.options.line.width === 0) ? this.options.line.width : 3) + this.options.line.color = this.options.line.color || '#ff000080' this.options['area-unit'] = options['area-unit'] || '平方米' this.entity this.event = new MouseEvent(this.sdk) @@ -60,8 +60,8 @@ class StraightArrowObject 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, @@ -109,14 +109,14 @@ class StraightArrowObject extends Base { return this.options.color } set color(v) { - this.options.color = v + this.options.color = v || '#ff000080' if (!this.sdk || !this.sdk.viewer || !this.entity || !this.entity.polygon) { return } - let material = Cesium.Color.fromCssColorString(v) + let material = Cesium.Color.fromCssColorString(this.options.color) if (this.sdk.viewer.scene.mode === 2) { material = new Cesium.CustomColorMaterialSource({ - color: v + color: this.options.color }) } this.entity.polygon.material = material @@ -126,7 +126,7 @@ class StraightArrowObject extends Base { el: item.el, size: 'mini',//颜色box类型 alpha: true,//是否开启透明度 - defaultColor: v, + defaultColor: this.options.color, disabled: false,//是否禁止打开颜色选择器 openPickerAni: 'opacity',//打开颜色选择器动画 sure: (c) => { @@ -466,7 +466,7 @@ class StraightArrowObject 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 diff --git a/src/Obj/Base/TrajectoryMotion/index.js b/src/Obj/Base/TrajectoryMotion/index.js index 9580fc5..a626030 100644 --- a/src/Obj/Base/TrajectoryMotion/index.js +++ b/src/Obj/Base/TrajectoryMotion/index.js @@ -100,7 +100,7 @@ class TrajectoryMotion extends Base { 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', + 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, diff --git a/src/Obj/Base/WallRealStereoscopic/index.js b/src/Obj/Base/WallRealStereoscopic/index.js index e53825c..2e2ba62 100644 --- a/src/Obj/Base/WallRealStereoscopic/index.js +++ b/src/Obj/Base/WallRealStereoscopic/index.js @@ -60,8 +60,8 @@ class WallRealStereoscopic 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, @@ -398,7 +398,7 @@ class WallRealStereoscopic 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 diff --git a/src/Obj/Base/WallRealStereoscopic/index2.js b/src/Obj/Base/WallRealStereoscopic/index2.js index 649ecfb..4851c67 100644 --- a/src/Obj/Base/WallRealStereoscopic/index2.js +++ b/src/Obj/Base/WallRealStereoscopic/index2.js @@ -47,8 +47,8 @@ class WallStereoscopic 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, @@ -287,7 +287,7 @@ class WallStereoscopic 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 diff --git a/src/Obj/Base/WallRealStereoscopic2/index.js b/src/Obj/Base/WallRealStereoscopic2/index.js index 1196bb5..627965f 100644 --- a/src/Obj/Base/WallRealStereoscopic2/index.js +++ b/src/Obj/Base/WallRealStereoscopic2/index.js @@ -58,8 +58,8 @@ class WallRealStereoscopic 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, @@ -373,7 +373,7 @@ class WallRealStereoscopic 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 diff --git a/src/Obj/Base/WallRealStereoscopic2/index2.js b/src/Obj/Base/WallRealStereoscopic2/index2.js index 649ecfb..4851c67 100644 --- a/src/Obj/Base/WallRealStereoscopic2/index2.js +++ b/src/Obj/Base/WallRealStereoscopic2/index2.js @@ -47,8 +47,8 @@ class WallStereoscopic 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, @@ -287,7 +287,7 @@ class WallStereoscopic 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 diff --git a/src/Obj/Base/WallStereoscopic/index.js b/src/Obj/Base/WallStereoscopic/index.js index 2b7251b..3b32544 100644 --- a/src/Obj/Base/WallStereoscopic/index.js +++ b/src/Obj/Base/WallStereoscopic/index.js @@ -51,8 +51,8 @@ class WallStereoscopic 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, @@ -336,7 +336,7 @@ class WallStereoscopic 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 diff --git a/src/Obj/Base/WallStereoscopic/index2.js b/src/Obj/Base/WallStereoscopic/index2.js index bb8caf5..d45977c 100644 --- a/src/Obj/Base/WallStereoscopic/index2.js +++ b/src/Obj/Base/WallStereoscopic/index2.js @@ -47,8 +47,8 @@ class WallStereoscopic 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, @@ -287,7 +287,7 @@ class WallStereoscopic 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 diff --git a/src/Obj/Base/WallStereoscopic2/index.js b/src/Obj/Base/WallStereoscopic2/index.js index 19fd7ee..e2eb95a 100644 --- a/src/Obj/Base/WallStereoscopic2/index.js +++ b/src/Obj/Base/WallStereoscopic2/index.js @@ -47,8 +47,8 @@ class WallStereoscopic2 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, @@ -306,7 +306,7 @@ class WallStereoscopic2 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 diff --git a/src/Obj/Base/WallStereoscopic2/index2.js b/src/Obj/Base/WallStereoscopic2/index2.js index 649ecfb..4851c67 100644 --- a/src/Obj/Base/WallStereoscopic2/index2.js +++ b/src/Obj/Base/WallStereoscopic2/index2.js @@ -47,8 +47,8 @@ class WallStereoscopic 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, @@ -287,7 +287,7 @@ class WallStereoscopic 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 diff --git a/src/Obj/Element/fontSelect.js b/src/Obj/Element/fontSelect.js index fc5057b..7c76631 100644 --- a/src/Obj/Element/fontSelect.js +++ b/src/Obj/Element/fontSelect.js @@ -1,21 +1,27 @@ let fontData = [ + { + name: '黑体', + value: '黑体', + font: 'SimHei', + key: '0' + }, { name: '思源黑体', value: '思源黑体', font: 'SourceHanSansTi', - key: '0' + key: '1' }, { name: '庞门正道标题体', value: '庞门正道标题体', font: 'PMZDBTTi', - key: '1' + key: '2' }, { name: '数黑体', value: '数黑体', font: 'AlimamaShuHeiTi', - key: '2' + key: '3' } ]