Browse Source

Merge pull request #749 from ryandeba/trait-color-bug-fix

set the initial trait color input value after the InputColor is created
pull/756/head
Artur Arseniev 8 years ago
committed by GitHub
parent
commit
3548a0c8a5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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