diff --git a/src/style_manager/model/PropertyFactory.js b/src/style_manager/model/PropertyFactory.js index 5b42ad22e..afdfb5360 100644 --- a/src/style_manager/model/PropertyFactory.js +++ b/src/style_manager/model/PropertyFactory.js @@ -201,7 +201,7 @@ export default class PropertyFactory { ['background-color', { default: 'none' }, 'color'], // File type - ['background-image', { type: this.typeFile, functionName: 'url' }], + ['background-image', { type: this.typeFile, functionName: 'url', default: 'none' }], // Select types ['display', { type: this.typeSelect, default: 'block', options: this.opstDisplay }], @@ -341,6 +341,13 @@ export default class PropertyFactory { 'background', { detached: true, + layerLabel: (l, { values }) => { + const repeat = values['background-repeat-sub']; + const pos = values['background-position-sub']; + const att = values['background-attachment-sub']; + const size = values['background-size-sub']; + return `${repeat} ${pos} ${att} ${size}`; + }, properties: this.__sub([ { extend: 'background-image', id: 'background-image-sub' }, { extend: 'background-repeat', id: 'background-repeat-sub' }, diff --git a/test/specs/style_manager/model/PropertyFactory.js b/test/specs/style_manager/model/PropertyFactory.js index 55ae99295..a21ddae31 100644 --- a/test/specs/style_manager/model/PropertyFactory.js +++ b/test/specs/style_manager/model/PropertyFactory.js @@ -619,6 +619,7 @@ describe('PropertyFactory', () => { { property: 'background-image', id: 'background-image-sub', + default: 'none', type: 'file', functionName: 'url', },