Browse Source

Fix issues with stack properties

pull/2992/head
Artur Arseniev 6 years ago
parent
commit
b43b58245f
  1. 3
      src/style_manager/model/Property.js
  2. 2
      src/style_manager/view/LayerView.js
  3. 1
      src/style_manager/view/PropertyStackView.js
  4. 3
      src/style_manager/view/PropertyView.js

3
src/style_manager/model/Property.js

@ -202,7 +202,8 @@ const Property = Backbone.Model.extend(
}
if (fn && hasValue) {
const fnParameter = fn === 'url' ? `'${value}'` : value;
const fnParameter =
fn === 'url' ? `'${value.replace(/'/g, '')}'` : value;
value = `${fn}(${fnParameter})`;
}

2
src/style_manager/view/LayerView.js

@ -169,7 +169,7 @@ export default Backbone.View.extend({
const preview = model.get('preview');
const properties = new PropertiesView({
collection: model.get('properties'),
config: this.config,
config: { ...this.config, fromLayer: 1 },
target: propsConfig.target,
customValue: propsConfig.customValue,
propTarget: propsConfig.propTarget,

1
src/style_manager/view/PropertyStackView.js

@ -34,6 +34,7 @@ export default PropertyCompositeView.extend({
config: this.config,
propsConfig
});
// For detached properties (eg. clear all)
const PropertiesView = require('./PropertiesView').default;
this.propsView = new PropertiesView({
target: this.target,

3
src/style_manager/view/PropertyView.js

@ -258,6 +258,9 @@ export default Backbone.View.extend({
* Fired when the target is changed
* */
targetUpdated(mod, val, opts = {}) {
// Skip properties rendered in Stack Layers
if (this.config.fromLayer) return;
this.emitUpdateTarget();
if (!this.checkVisibility()) {

Loading…
Cancel
Save