修复线段标签背景修改无效的问提
This commit is contained in:
@ -825,7 +825,6 @@ 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({
|
||||
@ -840,6 +839,29 @@ class PolylineObject extends Base {
|
||||
}, //点击确认按钮事件回调
|
||||
clear: () => {
|
||||
this.labelLineColor = 'rgba(0,255,255,0.5)'
|
||||
} //点击清空按钮事件回调
|
||||
})
|
||||
this._elms.labelLineColor[i] = lineColorPicker
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
get labelBackgroundColorStart() {
|
||||
return this.options.label.backgroundColor[0]
|
||||
}
|
||||
set labelBackgroundColorStart(v) {
|
||||
this.options.label.backgroundColor[0] = v
|
||||
this.label.backgroundColor = [v, this.label.backgroundColor[1]]
|
||||
if (this._elms.labelBackgroundColorStart) {
|
||||
this._elms.labelBackgroundColorStart.forEach((item, i) => {
|
||||
let labelBackgroundColorStartPicker = new YJColorPicker({
|
||||
el: item.el,
|
||||
size: 'mini', //颜色box类型
|
||||
alpha: true, //是否开启透明度
|
||||
defaultColor: this.labelBackgroundColorStart,
|
||||
disabled: false, //是否禁止打开颜色选择器
|
||||
openPickerAni: 'opacity', //打开颜色选择器动画
|
||||
sure: color => {
|
||||
this.labelBackgroundColorStart = color
|
||||
}, //点击确认按钮事件回调
|
||||
clear: () => {
|
||||
@ -848,7 +870,7 @@ class PolylineObject extends Base {
|
||||
})
|
||||
this._elms.labelBackgroundColorStart[
|
||||
i
|
||||
] = _this.labelBackgroundColorStartPicker
|
||||
] = labelBackgroundColorStartPicker
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user