Browse Source

Update clear in Stack

up-style-manager
Artur Arseniev 5 years ago
parent
commit
00dd2456da
  1. 10
      src/style_manager/model/PropertyStack.js
  2. 2
      test/specs/style_manager/model/Properties.js

10
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

2
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);

Loading…
Cancel
Save