Browse Source

Fix unit change in Style manager. Closes #2028

pull/2062/head
Artur Arseniev 7 years ago
parent
commit
ff33171c05
  1. 4
      src/style_manager/view/PropertyCompositeView.js
  2. 7
      src/style_manager/view/PropertyView.js

4
src/style_manager/view/PropertyCompositeView.js

@ -118,10 +118,6 @@ module.exports = PropertyView.extend({
view && view.getTargetValue({ ignoreCustomValue: 1, ignoreDefault: 1 });
}
if (view) {
value = view.model.parseValue(value).value;
}
return value;
},

7
src/style_manager/view/PropertyView.js

@ -215,7 +215,8 @@ module.exports = Backbone.View.extend({
const config = this.config;
const em = config.em;
const model = this.model;
const { model } = this;
const property = model.get('property');
let value = '';
let status = '';
let targetValue = this.getTargetValue({ ignoreDefault: 1 });
@ -247,8 +248,8 @@ module.exports = Backbone.View.extend({
this.setStatus(status);
if (em) {
em.trigger('styleManager:change', this);
em.trigger(`styleManager:change:${model.get('property')}`, this);
em.trigger('styleManager:change', this, property, value);
em.trigger(`styleManager:change:${property}`, this, value);
}
},

Loading…
Cancel
Save