Skip to content

Commit

Permalink
do readOnly check for configured properties where they are handed dow…
Browse files Browse the repository at this point in the history
…n, rather than when they are consumed.
  • Loading branch information
Steven Orvell committed Nov 5, 2015
1 parent 6d4b540 commit 24bcedb
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/standard/configure.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@

// at configure time values are stored in _config
_configValue: function(name, value) {
this._config[name] = value;
var info = this._propertyInfo[name];
if (!info || !info.readOnly) {
this._config[name] = value;
}
},

// Override polymer-mini thunk
Expand Down Expand Up @@ -98,7 +101,7 @@
// there are some test issues.
//this._configureProperties(this._propertyInfo, config);
// override local configuration with configuration from above
this._mixinConfigure(config, this._aboveConfig);
this.mixin(config, this._aboveConfig);
// this is the new _config, which are the final values to be applied
this._config = config;
// pass configuration data to bindings
Expand All @@ -122,15 +125,6 @@
}
},

_mixinConfigure: function(a, b) {
for (var prop in b) {
var info = this._propertyInfo[prop];
if (!info || !info.readOnly) {
a[prop] = b[prop];
}
}
},

// distribute config values to bound nodes.
_distributeConfig: function(config) {
var fx$ = this._propertyEffects;
Expand Down

0 comments on commit 24bcedb

Please sign in to comment.