mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -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"
|
"test"
|
||||||
],
|
],
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"straps": "~1.5.2",
|
"straps": "~1.6.0",
|
||||||
"acorn": "git://github.com/paperjs/acorn#0.3.2",
|
"acorn": "git://github.com/paperjs/acorn#0.3.2",
|
||||||
"stats.js": "r11"
|
"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,
|
// 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.
|
// and why we can only call this after everything else is set up (e.g.
|
||||||
// setLabel() requires this._labelCell).
|
// setLabel() requires this._labelCell).
|
||||||
Base.set(this, obj);
|
// Exclude name because it's already set, and value since we want to set
|
||||||
this._defaultValue = this._value; // after Base.set, through #setValue()
|
// 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.
|
// Start firing change events after we have initialized.
|
||||||
this._dontFire = false;
|
this._dontFire = false;
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue