Use this._set() instead of Base.set(), since it filters for existing properties.

This commit is contained in:
Jürg Lehni 2014-10-02 18:35:03 +02:00
parent fd6741ce5a
commit 8907662524
2 changed files with 3 additions and 5 deletions

View file

@ -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;

View file

@ -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.