Browse Source

Merge branch 'dev' of https://github.com/artf/grapesjs into Categories-order

* 'dev' of https://github.com/artf/grapesjs:
  fix bug with color traits
pull/747/head
Juan Martín Pithod 8 years ago
parent
commit
ece295ac40
  1. 12
      src/trait_manager/model/Trait.js

12
src/trait_manager/model/Trait.js

@ -62,6 +62,18 @@ module.exports = require('backbone').Model.extend({
},
setValueFromInput(value, final = 1, opts = {}) {
const toSet = { value };
this.set(toSet, { ...opts, avoidStore: 1});
// Have to trigger the change
if (final) {
this.set('value', '', opts);
this.set(toSet, opts);
}
},
/**
* Get the initial value of the trait
* @return {string}

Loading…
Cancel
Save