Browse Source

Split properties in composite

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

4
src/style_manager/model/PropertyComposite.js

@ -57,9 +57,7 @@ export default Property.extend({
},
_up(props, opts = {}) {
if (this.isDetached() && props.value) {
this.__setProperties(this.__getSplitValue(props.value), opts);
}
this.__setProperties(this.__getSplitValue(props.value), opts);
return Property.prototype._up.call(this, props, opts);
},

9
test/specs/style_manager/model/Properties.js

@ -139,6 +139,15 @@ describe('StyleManager properties logic', () => {
[propCTest]: '11px',
[propDTest]: '11px',
});
compTypeProp.upValue('');
[
[propATest, ''],
[propBTest, ''],
[propCTest, ''],
[propDTest, ''],
].forEach(item => {
expect(compTypeProp.getProperty(item[0]).getFullValue()).toBe(item[1]);
});
});
test('getPropsFromStyle returns correct values', () => {

Loading…
Cancel
Save