Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Literal args comma fix #1577

Merged
merged 14 commits into from
May 22, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion polymer.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<link rel="import" href="src/standard/events.html">
<link rel="import" href="src/standard/gestures.html">
<link rel="import" href="src/standard/utils.html">
<link rel="import" href="src/standard/effects.html">
<link rel="import" href="src/standard/effectBuilder.html">
<link rel="import" href="src/standard/configure.html">
<link rel="import" href="src/standard/notify-path.html">
<link rel="import" href="src/standard/resolveUrl.html">
Expand Down
11 changes: 8 additions & 3 deletions src/lib/bind/effects.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,21 @@
for (var i=0, l=args.length; i<l; i++) {
var arg = args[i];
var name = arg.name;
var v = arg.structured ?
Polymer.Base.get(name, model) : model[name];
if (arg.literal) {
v = arg.value;
} else if (arg.structured) {
v = Polymer.Base.get(name, model);
} else {
v = model[name];
}
if (args.length > 1 && v === undefined) {
return;
}
if (arg.wildcard) {
// Only send the actual path changed info if the change that
// caused the observer to run matched the wildcard
var baseChanged = (name.indexOf(path + '.') === 0);
var matches = (effect.arg.name.indexOf(name) === 0 && !baseChanged);
var matches = (effect.trigger.name.indexOf(name) === 0 && !baseChanged);
values[i] = {
path: matches ? path : name,
value: matches ? value : v,
Expand Down
5 changes: 5 additions & 0 deletions src/standard/configure.html
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@
// configure: returns user supplied default property values
// combines with _config to create final property values
_configure: function() {
// some annotation data needs to be handed from host to client
// e.g. hand template content stored in notes to children as part of
// configure flow so templates have their content at ready time
this._configureAnnotationReferences();
// get individual default values from property configs
var config = {};
Expand Down Expand Up @@ -132,6 +135,8 @@

// Override polymer-mini thunk
_afterClientsReady: function() {
// process static effects, e.g. computations that have only literal arguments
this._executeStaticEffects();
this._applyConfig(this._config);
this._flushHandlers();
},
Expand Down
Loading