getSmartOption => getDynamicOption
This commit is contained in:
parent
d54d3aa514
commit
98f4e69abb
2 changed files with 3 additions and 3 deletions
|
@ -271,7 +271,7 @@ L.U.FeatureMixin = {
|
||||||
return value
|
return value
|
||||||
},
|
},
|
||||||
|
|
||||||
getSmartOption: function (option, fallback) {
|
getDynamicOption: function (option, fallback) {
|
||||||
let value = this.getOption(option, fallback)
|
let value = this.getOption(option, fallback)
|
||||||
// There is a variable inside.
|
// There is a variable inside.
|
||||||
if (typeof value === 'string' && value.indexOf('{') != -1) {
|
if (typeof value === 'string' && value.indexOf('{') != -1) {
|
||||||
|
@ -718,7 +718,7 @@ L.U.PathMixin = {
|
||||||
let option
|
let option
|
||||||
for (const idx in this.styleOptions) {
|
for (const idx in this.styleOptions) {
|
||||||
option = this.styleOptions[idx]
|
option = this.styleOptions[idx]
|
||||||
options[option] = this.getSmartOption(option)
|
options[option] = this.getDynamicOption(option)
|
||||||
}
|
}
|
||||||
if (options.interactive) this.options.pointerEvents = 'visiblePainted'
|
if (options.interactive) this.options.pointerEvents = 'visiblePainted'
|
||||||
else this.options.pointerEvents = 'stroke'
|
else this.options.pointerEvents = 'stroke'
|
||||||
|
|
|
@ -24,7 +24,7 @@ L.U.Icon = L.DivIcon.extend({
|
||||||
|
|
||||||
_getColor: function () {
|
_getColor: function () {
|
||||||
let color
|
let color
|
||||||
if (this.feature) color = this.feature.getSmartOption('color')
|
if (this.feature) color = this.feature.getDynamicOption('color')
|
||||||
else if (this.options.color) color = this.options.color
|
else if (this.options.color) color = this.options.color
|
||||||
else color = this.map.getDefaultOption('color')
|
else color = this.map.getDefaultOption('color')
|
||||||
return color
|
return color
|
||||||
|
|
Loading…
Reference in a new issue