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).
// 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;

View file

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