Browse Source

Split values in multiple props

up-style-manager
Artur Arseniev 4 years ago
parent
commit
f94d01c93d
  1. 10
      src/style_manager/index.js
  2. 4
      src/style_manager/model/PropertyComposite.js

10
src/style_manager/index.js

@ -566,7 +566,15 @@ export default () => {
sectors.map(sector => {
sector.getProperties().map(prop => {
this.__upProp(prop, style, parentStyles, opts);
const props = prop.getProperties?.();
if (props /*&& prop.isDetached?.()*/) {
const fromStyle = prop.get('fromStyle');
// TODO parentStyles should be as newStyle
const newStyle = fromStyle ? fromStyle(style) : style;
props.forEach(prop => this.__upProp(prop, newStyle, parentStyles, opts));
} else {
this.__upProp(prop, style, parentStyles, opts);
}
});
});
},

4
src/style_manager/model/PropertyComposite.js

@ -118,6 +118,10 @@ export default Property.extend({
return this.get('properties').at(index);
},
isDetached() {
return !!this.get('detached');
},
getProperties() {
return [...this.get('properties').models];
},

Loading…
Cancel
Save