mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-22 07:19:57 -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).
|
// setLabel() requires this._labelCell).
|
||||||
// Exclude name because it's already set, and value since we want to set
|
// Exclude name because it's already set, and value since we want to set
|
||||||
// it after range.
|
// it after range.
|
||||||
Base.set(this, props, { name: true, value: true });
|
this._set(props, { name: true, value: true });
|
||||||
this.setValue(value);
|
this.setValue(value);
|
||||||
// Start firing change events after we have initialized.
|
// Start firing change events after we have initialized.
|
||||||
this._dontFire = false;
|
this._dontFire = false;
|
||||||
|
|
|
@ -40,10 +40,8 @@
|
||||||
this._element = parent.appendChild(
|
this._element = parent.appendChild(
|
||||||
DomElement.create('div', { class: 'palettejs-palette' },
|
DomElement.create('div', { class: 'palettejs-palette' },
|
||||||
[this._table]));
|
[this._table]));
|
||||||
if (props) {
|
if (props)
|
||||||
Base.set(this, props,
|
this._set(props, { title: true, components: true, values: true });
|
||||||
{ title: true, components: true, values: true });
|
|
||||||
}
|
|
||||||
// Link to the current scope's palettes list.
|
// Link to the current scope's palettes list.
|
||||||
// TODO: This is the only paper dependency in Palette.js
|
// TODO: This is the only paper dependency in Palette.js
|
||||||
// Find a way to make it independent.
|
// Find a way to make it independent.
|
||||||
|
|
Loading…
Reference in a new issue