Browse Source

Update built-in props

up-style-manager
Artur Arseniev 4 years ago
parent
commit
d33fb8016a
  1. 9
      src/style_manager/model/PropertyFactory.js
  2. 1
      test/specs/style_manager/model/PropertyFactory.js

9
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' },

1
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',
},

Loading…
Cancel
Save