getSmartOption => getDynamicOption

This commit is contained in:
Yohan Boniface 2023-06-23 08:15:39 +02:00
parent d54d3aa514
commit 98f4e69abb
2 changed files with 3 additions and 3 deletions

View file

@ -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'

View file

@ -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