Skip to content

Commit

Permalink
Clean up templatizer _pathEffectorImpl.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Oct 8, 2015
1 parent e4c2433 commit 1a89bcf
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions src/lib/template/templatizer.html
Expand Up @@ -246,9 +246,7 @@
template._forwardParentProp = this._forwardParentProp.bind(this);
}
this._extendTemplate(template, proto);
if (template != this) {
template._pathEffector = this._pathEffectorTemplate.bind(this);
}
template._pathEffector = this._pathEffectorImpl.bind(this, template);
}
},

Expand Down Expand Up @@ -306,22 +304,14 @@
},

// Overrides Base notify-path module
_pathEffector: function(path, value, fromAbove) {
if (this._forwardParentPath) {
if (path.indexOf(this._parentPropPrefix) === 0) {
this._forwardParentPath(path.substring(8), value);
}
}
Polymer.Base._pathEffector.apply(this, arguments);
},

// Overrides Base notify-path module (for non-PE templates)
_pathEffectorTemplate: function(path, value, fromAbove) {
_pathEffectorImpl: function(template, path, value, fromAbove) {
if (this._forwardParentPath) {
if (path.indexOf(this._parentPropPrefix) === 0) {
this._forwardParentPath(path.substring(8), value);
var subPath = path.substring(this._parentPropPrefix.length);
this._forwardParentPath(subPath, value);
}
}
Polymer.Base._pathEffector.call(template, path, value, fromAbove);
},

_constructorImpl: function(model, host) {
Expand Down

0 comments on commit 1a89bcf

Please sign in to comment.