mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-28 17:02:24 -05:00
Always set Component#value at the end of all other values.
Closes #365.
This commit is contained in:
parent
24a80dca27
commit
c7970e367d
2 changed files with 6 additions and 3 deletions
|
@ -24,7 +24,7 @@
|
|||
"test"
|
||||
],
|
||||
"devDependencies": {
|
||||
"straps": "~1.5.2",
|
||||
"straps": "~1.6.0",
|
||||
"acorn": "git://github.com/paperjs/acorn#0.3.2",
|
||||
"stats.js": "r11"
|
||||
},
|
||||
|
|
|
@ -122,8 +122,11 @@ var Component = Base.extend(Callback, /** @lends Component# */{
|
|||
// NOTE: This triggers setters, which is why we set _dontFire = true,
|
||||
// and why we can only call this after everything else is set up (e.g.
|
||||
// setLabel() requires this._labelCell).
|
||||
Base.set(this, obj);
|
||||
this._defaultValue = this._value; // after Base.set, through #setValue()
|
||||
// Exclude name because it's already set, and value since we want to set
|
||||
// it after range.
|
||||
Base.set(this, obj, { name: true, value: true });
|
||||
this.setValue(obj.value);
|
||||
this._defaultValue = this._value;
|
||||
// Start firing change events after we have initialized.
|
||||
this._dontFire = false;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue