Browse Source

set the initial trait color input value after the InputColor is created

pull/749/head
Ryan Deba 9 years ago
parent
commit
219011c948
  1. 5
      src/trait_manager/view/TraitColorView.js

5
src/trait_manager/view/TraitColorView.js

@ -10,16 +10,17 @@ module.exports = TraitView.extend({
getInputEl() {
if (!this.$input) {
var value = this.getModelValue();
var inputNumber = new InputColor({
var inputColor = new InputColor({
target: this.config.em,
contClass: this.ppfx + 'field-color',
model: this.model,
ppfx: this.ppfx
});
this.input = inputNumber.render();
this.input = inputColor.render();
this.$input = this.input.colorEl;
value = value || '';
this.model.set('value', value).trigger('change:value');
this.input.setValue(value);
}
return this.$input.get(0);
},

Loading…
Cancel
Save