Skip to content

Commit

Permalink
Merge pull request #554 from PolymerElements/compile
Browse files Browse the repository at this point in the history
Various iron-list Closure compilation fixes
  • Loading branch information
aomarks authored Jun 17, 2019
2 parents a894e9b + 49d108a commit 56ff09f
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions iron-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ Polymer({

/**
* An array of DOM nodes that are currently in the tree
* @type {?Array<!TemplateInstanceBase>}
* @type {?Array<!HTMLElement>}
*/
_physicalItems: null,

Expand Down Expand Up @@ -507,13 +507,14 @@ Polymer({

/**
* The the item that is focused if it is moved offscreen.
* @private {?TemplatizerNode}
* @private {?HTMLElement}
*/
_offscreenFocusedItem: null,

/**
* The item that backfills the `_offscreenFocusedItem` in the physical items
* list when that item is moved offscreen.
* @type {?HTMLElement}
*/
_focusBackfillItem: null,

Expand Down Expand Up @@ -1031,7 +1032,8 @@ Polymer({
if (this.ctor) {
return;
}
this._userTemplate = this.queryEffectiveChildren('template');
this._userTemplate = /** @type {!HTMLTemplateElement} */ (
this.queryEffectiveChildren('template'));
if (!this._userTemplate) {
console.warn('iron-list requires a template to be provided in light-dom');
}
Expand Down Expand Up @@ -1128,7 +1130,7 @@ Polymer({
path = path.substring(dot + 1);
path = this.as + (path ? '.' + path : '');
inst._setPendingPropertyOrPath(path, value, false, true);
inst._flushProperties && inst._flushProperties(true);
inst._flushProperties && inst._flushProperties();
// TODO(blasten): V1 doesn't do this and it's a bug
if (isIndexRendered) {
this._updateMetrics([pidx]);
Expand Down Expand Up @@ -1773,7 +1775,8 @@ Polymer({
if (!this._focusBackfillItem) {
// Create a physical item.
var inst = this.stamp(null);
this._focusBackfillItem = inst.root.querySelector('*');
this._focusBackfillItem =
/** @type {!HTMLElement} */ (inst.root.querySelector('*'));
this._itemsParent.appendChild(inst.root);
}
// Set the offcreen focused physical item.
Expand Down Expand Up @@ -1937,7 +1940,7 @@ Polymer({
.concat([this._offscreenFocusedItem, this._focusBackfillItem])
.forEach(function(item) {
if (item) {
this.modelForElement(item).notifyPath(path, value, true);
this.modelForElement(item).notifyPath(path, value);
}
}, this);
},
Expand Down

0 comments on commit 56ff09f

Please sign in to comment.