From f190fbe4f976f8870cba2e6a3497a961340eca35 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 21 Dec 2021 13:32:53 +0100 Subject: [PATCH] Split properties in composite --- src/style_manager/model/PropertyComposite.js | 4 +--- test/specs/style_manager/model/Properties.js | 9 +++++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/style_manager/model/PropertyComposite.js b/src/style_manager/model/PropertyComposite.js index 549840106..0db7c3dbf 100644 --- a/src/style_manager/model/PropertyComposite.js +++ b/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); }, diff --git a/test/specs/style_manager/model/Properties.js b/test/specs/style_manager/model/Properties.js index ac3959bab..dc0e66933 100644 --- a/test/specs/style_manager/model/Properties.js +++ b/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', () => {