diff --git a/src/style_manager/model/PropertyStack.js b/src/style_manager/model/PropertyStack.js index 4b7a8f8f7..4b330de10 100644 --- a/src/style_manager/model/PropertyStack.js +++ b/src/style_manager/model/PropertyStack.js @@ -428,6 +428,16 @@ export default Property.extend({ return this.getLayers().length > 0 && !parentValue; }, + /** + * Extended + * @private + */ + clear(opts = {}) { + this.getLayers().reset(); + this.__upTargetsStyleProps(opts); + return PropertyBase.prototype.clear.call(this); + }, + /** * This method allows to customize layers returned from the target * @param {Object} target diff --git a/test/specs/style_manager/model/Properties.js b/test/specs/style_manager/model/Properties.js index 4b9b3b9c6..7737d4221 100644 --- a/test/specs/style_manager/model/Properties.js +++ b/test/specs/style_manager/model/Properties.js @@ -289,7 +289,7 @@ describe('StyleManager properties logic', () => { }); }); - test.skip('On clear removes all values', () => { + test('On clear removes all values', () => { compTypeProp.clear(); expect(compTypeProp.hasValue()).toBe(false); expect(compTypeProp.getLayers().length).toBe(0);