mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Use this._set() instead of Base.set(), since it filters for existing properties.
This commit is contained in:
parent
fd6741ce5a
commit
8907662524
2 changed files with 3 additions and 5 deletions
|
@ -164,7 +164,7 @@ var Component = Base.extend(Callback, /** @lends Component# */{
|
|||
// setLabel() requires this._labelCell).
|
||||
// Exclude name because it's already set, and value since we want to set
|
||||
// it after range.
|
||||
Base.set(this, props, { name: true, value: true });
|
||||
this._set(props, { name: true, value: true });
|
||||
this.setValue(value);
|
||||
// Start firing change events after we have initialized.
|
||||
this._dontFire = false;
|
||||
|
|
|
@ -40,10 +40,8 @@
|
|||
this._element = parent.appendChild(
|
||||
DomElement.create('div', { class: 'palettejs-palette' },
|
||||
[this._table]));
|
||||
if (props) {
|
||||
Base.set(this, props,
|
||||
{ title: true, components: true, values: true });
|
||||
}
|
||||
if (props)
|
||||
this._set(props, { title: true, components: true, values: true });
|
||||
// Link to the current scope's palettes list.
|
||||
// TODO: This is the only paper dependency in Palette.js
|
||||
// Find a way to make it independent.
|
||||
|
|
Loading…
Reference in a new issue