Browse Source
Merge pull request #736 from ryandeba/color-traits-fix Closes #731
fix bug with color traits
pull/745/head
Artur Arseniev
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
12 additions and
0 deletions
-
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} |
|
|
|
|