diff --git a/src/style_manager/model/PropertyComposite.js b/src/style_manager/model/PropertyComposite.js index 97949f8bd..74d05236b 100644 --- a/src/style_manager/model/PropertyComposite.js +++ b/src/style_manager/model/PropertyComposite.js @@ -272,14 +272,15 @@ export default class PropertyComposite extends Property { if (!this.__styleHasProps(style)) return null; const { byName } = opts; + const name = this.getName(); const props = this.getProperties(); const sep = this.getSplitSeparator(); const fromStyle = this.get('fromStyle'); - let result = fromStyle ? fromStyle(style, { property: this, separator: sep }) : {}; + let result = fromStyle ? fromStyle(style, { property: this, name, separator: sep }) : {}; if (!fromStyle) { // Get props from the main property - result = this.__getSplitValue(style[this.getName()] || '', { byName }); + result = this.__getSplitValue(style[name] || '', { byName }); // Get props from the inner properties props.forEach(prop => { diff --git a/src/style_manager/model/PropertyStack.js b/src/style_manager/model/PropertyStack.js index e2288c759..e8ed74ccb 100644 --- a/src/style_manager/model/PropertyStack.js +++ b/src/style_manager/model/PropertyStack.js @@ -373,7 +373,7 @@ export default class PropertyStack extends PropertyComposite { const props = this.getProperties(); const sep = this.getLayerSeparator(); const fromStyle = this.get('fromStyle'); - let result = fromStyle ? fromStyle(style, { property: this, separatorLayers: sep }) : []; + let result = fromStyle ? fromStyle(style, { property: this, name, separatorLayers: sep }) : []; if (!fromStyle) { // Get layers from the main property