From 863aea431306b3d6ff23acc076d824019497c92e Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Thu, 16 Dec 2021 17:55:33 +0100 Subject: [PATCH] Clear composite --- src/style_manager/model/PropertyComposite.js | 35 +------------------- 1 file changed, 1 insertion(+), 34 deletions(-) diff --git a/src/style_manager/model/PropertyComposite.js b/src/style_manager/model/PropertyComposite.js index 23fc4ce87..2974aa7f1 100644 --- a/src/style_manager/model/PropertyComposite.js +++ b/src/style_manager/model/PropertyComposite.js @@ -40,20 +40,8 @@ export default Property.extend({ Property.callInit(this, props, opts); }, - __upProperties(prop, opts = {}) { + __upProperties(p, opts = {}) { if (!this.__hasCustom() || opts.__up || opts.__clearIn) return; - - // if (this.isDetached()) { - // const style = this.getProperties().reduce((acc, prop) => { - // acc[prop.getName()] = prop.hasValue({ noParent: true }) ? prop.__getFullValue() : ''; - // return acc; - // }, {}); - // this.__upTargetsStyle({ ...style, [prop.getName()]: prop.__getFullValue() }, opts); - // } else { - // const { __clear, ...rest } = opts; - // this.upValue(this.__getFullValue(), rest); - // } - this.__upTargetsStyleProps(opts); }, @@ -61,27 +49,6 @@ export default Property.extend({ this.__upTargetsStyle(this.getStyleFromProps(), opts); }, - // __upTargetsStyle(style, opts = {}) { - // const toStyle = this.get('toStyle'); - // const { __clear } = opts; - // let newStyle = style; - - // if (toStyle && !__clear) { - // const values = this.getValues(); - // newStyle = toStyle(values, { ...opts, style }); - // } - - // if (this.isDetached()) { - // newStyle[this.getName()] = ''; - // } else { - // this.getProperties().map(prop => { - // newStyle[prop.getName()] = ''; - // }); - // } - - // return Property.prototype.__upTargetsStyle.call(this, newStyle, opts); - // }, - /** * Get style object from current properties * @returns {Object} Style object