Skip to content

Commit

Permalink
Minor changes from review.
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinpschaaf committed Apr 10, 2015
1 parent 364fcec commit 8b114fe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
5 changes: 2 additions & 3 deletions src/lib/template/templatizer.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
_prepParentProperties: function(archetype) {
var parentProps = this._parentProps = archetype._parentProps;
if (this._forwardParentProp && parentProps) {

// Prototype setup (memoized on archetype)
var proto = archetype._parentPropProto;
if (!proto) {
Expand All @@ -126,13 +125,11 @@
Polymer.Bind._createAccessors(proto, parentProp, effects);
}
}

// Instance setup
if (this._templatized != this) {
Polymer.Bind.prepareInstance(this._templatized);
}
this._extendTemplate(this._templatized, proto);

}
},

Expand Down Expand Up @@ -195,6 +192,8 @@
stamp: function(model) {
model = model || {};
if (this._parentProps) {
// TODO(kschaaf): Maybe this is okay
// model.parent = this.dataHost;
model.parent = model.parent || {};
for (var prop in this._parentProps) {
model.parent[prop] = this['_parent_' + prop];
Expand Down
8 changes: 4 additions & 4 deletions src/lib/template/x-if.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@

render: function() {
this.debounce('render', function() {
if (!this.ctor) {
this._wrapTextNodes(this._content);
this.templatize(this);
}
if (this.if) {
if (!this.ctor) {
this._wrapTextNodes(this._content);
this.templatize(this);
}
this._ensureInstance();
} else if (this.restamp) {
this._teardownInstance();
Expand Down
4 changes: 2 additions & 2 deletions src/lib/template/x-repeat.html
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@

_itemsChanged: function(items, old, path) {
if (path) {
this._notifyItemChanged(path, items);
this._forwardItemPath(path, items);
this._checkObservedPaths(path);
} else {
if (old) {
Expand Down Expand Up @@ -496,7 +496,7 @@

// Called as a side effect of a host items.<key>.<path> path change,
// responsible for notifying item.<path> changes to row for key
_notifyItemChanged: function(path, value) {
_forwardItemPath: function(path, value) {
if (this._rowForKey) {
// 'items.'.length == 6
var dot = path.indexOf('.', 6);
Expand Down

0 comments on commit 8b114fe

Please sign in to comment.