Browse Source

Update getFullValue to return the default

pull/2675/head
Artur Arseniev 6 years ago
parent
commit
237926b42a
  1. 5
      src/style_manager/model/Property.js

5
src/style_manager/model/Property.js

@ -190,9 +190,14 @@ const Property = Backbone.Model.extend(
*/
getFullValue(val) {
const fn = this.get('functionName');
const def = this.getDefaultValue();
let value = isUndefined(val) ? this.get('value') : val;
const hasValue = !isUndefined(value) && value !== '';
if (value && def && value === def) {
return def;
}
if (fn && hasValue) {
value = `${fn}(${value})`;
}

Loading…
Cancel
Save