diff --git a/bower.json b/bower.json index dfb7076..9c5d618 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "aurelia-ui-virtualization", - "version": "1.0.0-beta.3.0.2", + "version": "1.0.0-beta.3.1.0", "description": "A plugin that provides a virtualized repeater and other virtualization services.", "keywords": [ "aurelia", diff --git a/dist/amd/array-virtual-repeat-strategy.js b/dist/amd/array-virtual-repeat-strategy.js index 54df0cb..2b18933 100644 --- a/dist/amd/array-virtual-repeat-strategy.js +++ b/dist/amd/array-virtual-repeat-strategy.js @@ -47,7 +47,7 @@ define(['exports', 'aurelia-templating-resources', './utilities'], function (exp }; ArrayVirtualRepeatStrategy.prototype.instanceChanged = function instanceChanged(repeat, items) { - this._inPlaceProcessItems(repeat, items); + this._inPlaceProcessItems(repeat, items, arguments.length <= 2 ? undefined : arguments[2]); }; ArrayVirtualRepeatStrategy.prototype._standardProcessInstanceChanged = function _standardProcessInstanceChanged(repeat, items) { @@ -57,10 +57,9 @@ define(['exports', 'aurelia-templating-resources', './utilities'], function (exp } }; - ArrayVirtualRepeatStrategy.prototype._inPlaceProcessItems = function _inPlaceProcessItems(repeat, items) { + ArrayVirtualRepeatStrategy.prototype._inPlaceProcessItems = function _inPlaceProcessItems(repeat, items, first) { var itemsLength = items.length; var viewsLength = repeat.viewCount(); - var first = repeat._getIndexOfFirstView(); while (viewsLength > itemsLength) { viewsLength--; @@ -81,6 +80,7 @@ define(['exports', 'aurelia-templating-resources', './utilities'], function (exp view.bindingContext[local] = items[i + first]; view.overrideContext.$middle = middle; view.overrideContext.$last = last; + view.overrideContext.$index = i + first; repeat.updateBindings(view); } diff --git a/dist/amd/template-strategy.js b/dist/amd/template-strategy.js index 3eb7c1e..d77b1da 100644 --- a/dist/amd/template-strategy.js +++ b/dist/amd/template-strategy.js @@ -88,7 +88,7 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-pal', 'aurelia-templ TableStrategy.prototype.getFirstElement = function getFirstElement(topBuffer) { var tbody = this._getTbodyElement(_aureliaPal.DOM.nextElementSibling(topBuffer)); var tr = tbody.firstChild; - return _aureliaPal.DOM.nextElementSibling(tr); + return tr; }; TableStrategy.prototype.getLastElement = function getLastElement(bottomBuffer) { diff --git a/dist/amd/virtual-repeat.js b/dist/amd/virtual-repeat.js index dcc0381..83a3219 100644 --- a/dist/amd/virtual-repeat.js +++ b/dist/amd/virtual-repeat.js @@ -148,6 +148,7 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-t }, 500); this.distanceToTop = this.domHelper.getElementDistanceToTopOfDocument(this.templateStrategy.getFirstElement(this.topBuffer)); + this.topBufferDistance = this.templateStrategy.getTopBufferDistance(this.topBuffer); if (this.domHelper.hasOverflowScroll(this.scrollContainer)) { @@ -202,17 +203,44 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-t if (!this.scope) { return; } + var reducingItems = false; + var previousLastViewIndex = this._getIndexOfLastView(); + var items = this.items; this.strategy = this.strategyLocator.getStrategy(items); if (items.length > 0 && this.viewCount() === 0) { this.strategy.createFirstItem(this); } + + if (this._itemsLength >= items.length) { + this._skipNextScrollHandle = true; + reducingItems = true; + } + this._checkFixedHeightContainer(); this._calcInitialHeights(items.length); if (!this.isOneTime && !this._observeInnerCollection()) { this._observeCollection(); } + this.strategy.instanceChanged(this, items, this._first); + this._lastRebind = this._first; + + if (reducingItems && previousLastViewIndex > this.items.length - 1) { + if (this.scrollContainer.tagName === 'TBODY') { + var realScrollContainer = this.scrollContainer.parentNode.parentNode; + realScrollContainer.scrollTop = realScrollContainer.scrollTop + this.viewCount() * this.itemHeight; + } else { + this.scrollContainer.scrollTop = this.scrollContainer.scrollTop + this.viewCount() * this.itemHeight; + } + } + if (!reducingItems) { + this._previousFirst = this._first; + this._scrollingDown = true; + this._scrollingUp = false; - this.strategy.instanceChanged(this, items, this._viewsLength); + this.isLastIndex = this._getIndexOfLastView() >= this.items.length - 1; + } + + this._handleScroll(); }; VirtualRepeat.prototype.unbind = function unbind() { @@ -265,6 +293,10 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-t if (!this._isAttached) { return; } + if (this._skipNextScrollHandle) { + this._skipNextScrollHandle = false; + return; + } var itemHeight = this.itemHeight; var scrollTop = this._fixedHeightContainer ? this.scrollContainer.scrollTop : pageYOffset - this.distanceToTop; this._first = Math.floor(scrollTop / itemHeight); @@ -398,6 +430,12 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-t } }; + VirtualRepeat.prototype._checkFixedHeightContainer = function _checkFixedHeightContainer() { + if (this.domHelper.hasOverflowScroll(this.scrollContainer)) { + this._fixedHeightContainer = true; + } + }; + VirtualRepeat.prototype._adjustBufferHeights = function _adjustBufferHeights() { this.topBuffer.style.height = this._topBufferHeight + 'px'; this.bottomBuffer.style.height = this._bottomBufferHeight + 'px'; @@ -484,20 +522,34 @@ define(['exports', 'aurelia-dependency-injection', 'aurelia-binding', 'aurelia-t }, 500); return; } + this._itemsLength = itemsLength; this.scrollContainerHeight = this._fixedHeightContainer ? this._calcScrollHeight(this.scrollContainer) : document.documentElement.clientHeight; this.elementsInView = Math.ceil(this.scrollContainerHeight / this.itemHeight) + 1; this._viewsLength = this.elementsInView * 2 + this._bufferSize; - this._bottomBufferHeight = this.itemHeight * itemsLength - this.itemHeight * this._viewsLength; - if (this._bottomBufferHeight < 0) { - this._bottomBufferHeight = 0; + + var newBottomBufferHeight = this.itemHeight * itemsLength - this.itemHeight * this._viewsLength; + if (newBottomBufferHeight < 0) { + newBottomBufferHeight = 0; } - this.bottomBuffer.style.height = this._bottomBufferHeight + 'px'; - this._topBufferHeight = 0; - this.topBuffer.style.height = this._topBufferHeight + 'px'; + if (this._topBufferHeight >= newBottomBufferHeight) { + this._topBufferHeight = newBottomBufferHeight; + this._bottomBufferHeight = 0; + this._first = this._itemsLength - this._viewsLength; + if (this._first < 0) { + this._first = 0; + } + } else { + this._first = this._getIndexOfFirstView(); + var adjustedTopBufferHeight = this._first * this.itemHeight; + this._topBufferHeight = adjustedTopBufferHeight; - this.scrollContainer.scrollTop = 0; - this._first = 0; + this._bottomBufferHeight = newBottomBufferHeight - adjustedTopBufferHeight; + if (this._bottomBufferHeight < 0) { + this._bottomBufferHeight = 0; + } + } + this._adjustBufferHeights(); return; }; diff --git a/dist/aurelia-ui-virtualization.d.ts b/dist/aurelia-ui-virtualization.d.ts index 57a3f4d..05caae4 100644 --- a/dist/aurelia-ui-virtualization.d.ts +++ b/dist/aurelia-ui-virtualization.d.ts @@ -78,7 +78,7 @@ export declare class ArrayVirtualRepeatStrategy extends ArrayRepeatStrategy { * @param repeat The repeater instance. * @param items The new array instance. */ - instanceChanged(repeat: VirtualRepeat, items: Array): void; + instanceChanged(repeat: VirtualRepeat, items: Array, ...rest: any[]): void; /** * Handle the repeat's collection instance mutating. @@ -133,6 +133,7 @@ export declare class VirtualRepeat extends AbstractRepeater { handleInnerCollectionMutated(collection?: any, changes?: any): void; // @override AbstractRepeater + // How will these behaviors need to change since we are in a virtual list instead? viewCount(): any; views(): any; view(index?: any): any; diff --git a/dist/aurelia-ui-virtualization.js b/dist/aurelia-ui-virtualization.js index 6bd465d..32b3721 100644 --- a/dist/aurelia-ui-virtualization.js +++ b/dist/aurelia-ui-virtualization.js @@ -112,8 +112,8 @@ export class ArrayVirtualRepeatStrategy extends ArrayRepeatStrategy { * @param repeat The repeater instance. * @param items The new array instance. */ - instanceChanged(repeat: VirtualRepeat, items: Array): void { - this._inPlaceProcessItems(repeat, items); + instanceChanged(repeat: VirtualRepeat, items: Array, ...rest): void { + this._inPlaceProcessItems(repeat, items, rest[0]); } _standardProcessInstanceChanged(repeat: VirtualRepeat, items: Array): void { @@ -123,10 +123,16 @@ export class ArrayVirtualRepeatStrategy extends ArrayRepeatStrategy { } } - _inPlaceProcessItems(repeat: VirtualRepeat, items: Array): void { + _inPlaceProcessItems(repeat: VirtualRepeat, items: Array, first: number): void { let itemsLength = items.length; let viewsLength = repeat.viewCount(); - let first = repeat._getIndexOfFirstView(); + /* + Get index of first view is looking at the view which is from the ViewSlot + The view slot has not yet been updated with the new list + New first has to be the calculated "first" in our view slot, so the first one that's going to be rendered + To figure out that one, we're going to have to know where we are in our scrolling so we can know how far down we've gone to show the first view + That "first" is calculated and passed into here + */ // remove unneeded views. while (viewsLength > itemsLength) { viewsLength--; @@ -148,6 +154,7 @@ export class ArrayVirtualRepeatStrategy extends ArrayRepeatStrategy { view.bindingContext[local] = items[i + first]; view.overrideContext.$middle = middle; view.overrideContext.$last = last; + view.overrideContext.$index = i + first; repeat.updateBindings(view); } // add new views @@ -457,7 +464,7 @@ export class TableStrategy { getFirstElement(topBuffer: Element): Element { const tbody = this._getTbodyElement(DOM.nextElementSibling(topBuffer)); const tr = tbody.firstChild; - return DOM.nextElementSibling(tr); + return tr; //since the buffer is outside table, first element _is_ first element. } getLastElement(bottomBuffer: Element): Element { @@ -613,6 +620,7 @@ export class VirtualRepeat extends AbstractRepeater { }, 500); this.distanceToTop = this.domHelper.getElementDistanceToTopOfDocument(this.templateStrategy.getFirstElement(this.topBuffer)); + // When dealing with tables, there can be gaps between elements, causing distances to be messed up. Might need to handle this case here. this.topBufferDistance = this.templateStrategy.getTopBufferDistance(this.topBuffer); if (this.domHelper.hasOverflowScroll(this.scrollContainer)) { @@ -667,17 +675,53 @@ export class VirtualRepeat extends AbstractRepeater { if (!this.scope) { return; } + let reducingItems = false; + let previousLastViewIndex = this._getIndexOfLastView(); + let items = this.items; this.strategy = this.strategyLocator.getStrategy(items); if (items.length > 0 && this.viewCount() === 0) { this.strategy.createFirstItem(this); } + // Skip scroll handling if we are decreasing item list + // Otherwise if expanding list, call the handle scroll below + if (this._itemsLength >= items.length) { + //Scroll handle is redundant in this case since the instanceChanged will re-evaluate orderings + // Also, when items are reduced, we're not having to move any bindings, just a straight rebind of the items in the list + this._skipNextScrollHandle = true; + reducingItems = true; + } + this._checkFixedHeightContainer(); this._calcInitialHeights(items.length); if (!this.isOneTime && !this._observeInnerCollection()) { this._observeCollection(); } + this.strategy.instanceChanged(this, items, this._first); + this._lastRebind = this._first; //Reset rebinding + + if (reducingItems && previousLastViewIndex > this.items.length - 1) { + //Do we need to set scrolltop so that we appear at the bottom of the list to match scrolling as far as we could? + //We only want to execute this line if we're reducing such that it brings us to the bottom of the new list + //Make sure we handle the special case of tables + if (this.scrollContainer.tagName === 'TBODY') { + let realScrollContainer = this.scrollContainer.parentNode.parentNode; //tbody > table > container + realScrollContainer.scrollTop = realScrollContainer.scrollTop + (this.viewCount() * this.itemHeight); + } else { + this.scrollContainer.scrollTop = this.scrollContainer.scrollTop + (this.viewCount() * this.itemHeight); + } + } + if (!reducingItems) { + // If we're expanding our items, then we need to reset our previous first for the next go around of scroll handling + this._previousFirst = this._first; + this._scrollingDown = true; //Simulating the down scroll event to load up data appropriately + this._scrollingUp = false; + + //Make sure we fix any state (we could have been at the last index before, but this doesn't get set until too late for scrolling) + this.isLastIndex = this._getIndexOfLastView() >= this.items.length - 1; + } - this.strategy.instanceChanged(this, items, this._viewsLength); + //Need to readjust the scroll position to "move" us back to the appropriate position, since moving the views will shift our view port's percieved location + this._handleScroll(); } unbind(): void { @@ -728,6 +772,10 @@ export class VirtualRepeat extends AbstractRepeater { if (!this._isAttached) { return; } + if (this._skipNextScrollHandle) { + this._skipNextScrollHandle = false; + return; + } let itemHeight = this.itemHeight; let scrollTop = this._fixedHeightContainer ? this.scrollContainer.scrollTop : pageYOffset - this.distanceToTop; this._first = Math.floor(scrollTop / itemHeight); @@ -859,6 +907,12 @@ export class VirtualRepeat extends AbstractRepeater { } } + _checkFixedHeightContainer(): void { + if (this.domHelper.hasOverflowScroll(this.scrollContainer)) { + this._fixedHeightContainer = true; + } + } + _adjustBufferHeights(): void { this.topBuffer.style.height = `${this._topBufferHeight}px`; this.bottomBuffer.style.height = `${this._bottomBufferHeight}px`; @@ -935,20 +989,38 @@ export class VirtualRepeat extends AbstractRepeater { }, 500); return; } + this._itemsLength = itemsLength; this.scrollContainerHeight = this._fixedHeightContainer ? this._calcScrollHeight(this.scrollContainer) : document.documentElement.clientHeight; this.elementsInView = Math.ceil(this.scrollContainerHeight / this.itemHeight) + 1; this._viewsLength = (this.elementsInView * 2) + this._bufferSize; - this._bottomBufferHeight = this.itemHeight * itemsLength - this.itemHeight * this._viewsLength; - if (this._bottomBufferHeight < 0) { + + //Look at top buffer height (how far we've scrolled down) + //If top buffer height is greater than the new bottom buffer height (how far we *can* scroll down) + // Then set top buffer height to max it can be (bottom buffer height - views in length?) and bottom buffer height to 0 + let newBottomBufferHeight = this.itemHeight * itemsLength - this.itemHeight * this._viewsLength; //How much buffer room to the bottom if you were at the top + if (newBottomBufferHeight < 0) { // In case of small lists, ensure that we never set the buffer heights to impossible values + newBottomBufferHeight = 0; + } + if (this._topBufferHeight >= newBottomBufferHeight) { //Use case when items are removed (we've scrolled past where we can) + this._topBufferHeight = newBottomBufferHeight; this._bottomBufferHeight = 0; + this._first = this._itemsLength - this._viewsLength; + if (this._first < 0) { // In case of small lists, ensure that we never set first to less than possible + this._first = 0; + } + } else { //Use case when items are added (we are adding scrollable space to the bottom) + // We need to re-evaluate which is the true "first". If we've added items, then the previous "first" is actually too far down the list + this._first = this._getIndexOfFirstView(); + let adjustedTopBufferHeight = this._first * this.itemHeight; //appropriate buffer height for top, might be 1 too long... + this._topBufferHeight = adjustedTopBufferHeight; + //But what about when we've only scrolled slightly down the list? We need to readjust the top buffer height then + this._bottomBufferHeight = newBottomBufferHeight - adjustedTopBufferHeight; + if (this._bottomBufferHeight < 0) { + this._bottomBufferHeight = 0; + } } - this.bottomBuffer.style.height = `${this._bottomBufferHeight}px`; - this._topBufferHeight = 0; - this.topBuffer.style.height = `${this._topBufferHeight}px`; - // TODO This will cause scrolling back to top when swapping collection instances that have different lengths - instead should keep the scroll position - this.scrollContainer.scrollTop = 0; - this._first = 0; + this._adjustBufferHeights(); return; } @@ -993,6 +1065,7 @@ export class VirtualRepeat extends AbstractRepeater { } // @override AbstractRepeater + // How will these behaviors need to change since we are in a virtual list instead? viewCount() { return this.viewSlot.children.length; } views() { return this.viewSlot.children; } view(index) { return this.viewSlot.children[index]; } diff --git a/dist/commonjs/array-virtual-repeat-strategy.js b/dist/commonjs/array-virtual-repeat-strategy.js index 5851b9b..075b6d5 100644 --- a/dist/commonjs/array-virtual-repeat-strategy.js +++ b/dist/commonjs/array-virtual-repeat-strategy.js @@ -30,7 +30,7 @@ var ArrayVirtualRepeatStrategy = exports.ArrayVirtualRepeatStrategy = function ( }; ArrayVirtualRepeatStrategy.prototype.instanceChanged = function instanceChanged(repeat, items) { - this._inPlaceProcessItems(repeat, items); + this._inPlaceProcessItems(repeat, items, arguments.length <= 2 ? undefined : arguments[2]); }; ArrayVirtualRepeatStrategy.prototype._standardProcessInstanceChanged = function _standardProcessInstanceChanged(repeat, items) { @@ -40,10 +40,9 @@ var ArrayVirtualRepeatStrategy = exports.ArrayVirtualRepeatStrategy = function ( } }; - ArrayVirtualRepeatStrategy.prototype._inPlaceProcessItems = function _inPlaceProcessItems(repeat, items) { + ArrayVirtualRepeatStrategy.prototype._inPlaceProcessItems = function _inPlaceProcessItems(repeat, items, first) { var itemsLength = items.length; var viewsLength = repeat.viewCount(); - var first = repeat._getIndexOfFirstView(); while (viewsLength > itemsLength) { viewsLength--; @@ -64,6 +63,7 @@ var ArrayVirtualRepeatStrategy = exports.ArrayVirtualRepeatStrategy = function ( view.bindingContext[local] = items[i + first]; view.overrideContext.$middle = middle; view.overrideContext.$last = last; + view.overrideContext.$index = i + first; repeat.updateBindings(view); } diff --git a/dist/commonjs/template-strategy.js b/dist/commonjs/template-strategy.js index 9ebf5dc..33cb683 100644 --- a/dist/commonjs/template-strategy.js +++ b/dist/commonjs/template-strategy.js @@ -97,7 +97,7 @@ var TableStrategy = exports.TableStrategy = (_dec2 = (0, _aureliaDependencyInjec TableStrategy.prototype.getFirstElement = function getFirstElement(topBuffer) { var tbody = this._getTbodyElement(_aureliaPal.DOM.nextElementSibling(topBuffer)); var tr = tbody.firstChild; - return _aureliaPal.DOM.nextElementSibling(tr); + return tr; }; TableStrategy.prototype.getLastElement = function getLastElement(bottomBuffer) { diff --git a/dist/commonjs/virtual-repeat.js b/dist/commonjs/virtual-repeat.js index 47689ce..8213373 100644 --- a/dist/commonjs/virtual-repeat.js +++ b/dist/commonjs/virtual-repeat.js @@ -145,6 +145,7 @@ var VirtualRepeat = exports.VirtualRepeat = (_dec = (0, _aureliaTemplating.custo }, 500); this.distanceToTop = this.domHelper.getElementDistanceToTopOfDocument(this.templateStrategy.getFirstElement(this.topBuffer)); + this.topBufferDistance = this.templateStrategy.getTopBufferDistance(this.topBuffer); if (this.domHelper.hasOverflowScroll(this.scrollContainer)) { @@ -199,17 +200,44 @@ var VirtualRepeat = exports.VirtualRepeat = (_dec = (0, _aureliaTemplating.custo if (!this.scope) { return; } + var reducingItems = false; + var previousLastViewIndex = this._getIndexOfLastView(); + var items = this.items; this.strategy = this.strategyLocator.getStrategy(items); if (items.length > 0 && this.viewCount() === 0) { this.strategy.createFirstItem(this); } + + if (this._itemsLength >= items.length) { + this._skipNextScrollHandle = true; + reducingItems = true; + } + this._checkFixedHeightContainer(); this._calcInitialHeights(items.length); if (!this.isOneTime && !this._observeInnerCollection()) { this._observeCollection(); } + this.strategy.instanceChanged(this, items, this._first); + this._lastRebind = this._first; + + if (reducingItems && previousLastViewIndex > this.items.length - 1) { + if (this.scrollContainer.tagName === 'TBODY') { + var realScrollContainer = this.scrollContainer.parentNode.parentNode; + realScrollContainer.scrollTop = realScrollContainer.scrollTop + this.viewCount() * this.itemHeight; + } else { + this.scrollContainer.scrollTop = this.scrollContainer.scrollTop + this.viewCount() * this.itemHeight; + } + } + if (!reducingItems) { + this._previousFirst = this._first; + this._scrollingDown = true; + this._scrollingUp = false; - this.strategy.instanceChanged(this, items, this._viewsLength); + this.isLastIndex = this._getIndexOfLastView() >= this.items.length - 1; + } + + this._handleScroll(); }; VirtualRepeat.prototype.unbind = function unbind() { @@ -262,6 +290,10 @@ var VirtualRepeat = exports.VirtualRepeat = (_dec = (0, _aureliaTemplating.custo if (!this._isAttached) { return; } + if (this._skipNextScrollHandle) { + this._skipNextScrollHandle = false; + return; + } var itemHeight = this.itemHeight; var scrollTop = this._fixedHeightContainer ? this.scrollContainer.scrollTop : pageYOffset - this.distanceToTop; this._first = Math.floor(scrollTop / itemHeight); @@ -395,6 +427,12 @@ var VirtualRepeat = exports.VirtualRepeat = (_dec = (0, _aureliaTemplating.custo } }; + VirtualRepeat.prototype._checkFixedHeightContainer = function _checkFixedHeightContainer() { + if (this.domHelper.hasOverflowScroll(this.scrollContainer)) { + this._fixedHeightContainer = true; + } + }; + VirtualRepeat.prototype._adjustBufferHeights = function _adjustBufferHeights() { this.topBuffer.style.height = this._topBufferHeight + 'px'; this.bottomBuffer.style.height = this._bottomBufferHeight + 'px'; @@ -481,20 +519,34 @@ var VirtualRepeat = exports.VirtualRepeat = (_dec = (0, _aureliaTemplating.custo }, 500); return; } + this._itemsLength = itemsLength; this.scrollContainerHeight = this._fixedHeightContainer ? this._calcScrollHeight(this.scrollContainer) : document.documentElement.clientHeight; this.elementsInView = Math.ceil(this.scrollContainerHeight / this.itemHeight) + 1; this._viewsLength = this.elementsInView * 2 + this._bufferSize; - this._bottomBufferHeight = this.itemHeight * itemsLength - this.itemHeight * this._viewsLength; - if (this._bottomBufferHeight < 0) { - this._bottomBufferHeight = 0; + + var newBottomBufferHeight = this.itemHeight * itemsLength - this.itemHeight * this._viewsLength; + if (newBottomBufferHeight < 0) { + newBottomBufferHeight = 0; } - this.bottomBuffer.style.height = this._bottomBufferHeight + 'px'; - this._topBufferHeight = 0; - this.topBuffer.style.height = this._topBufferHeight + 'px'; + if (this._topBufferHeight >= newBottomBufferHeight) { + this._topBufferHeight = newBottomBufferHeight; + this._bottomBufferHeight = 0; + this._first = this._itemsLength - this._viewsLength; + if (this._first < 0) { + this._first = 0; + } + } else { + this._first = this._getIndexOfFirstView(); + var adjustedTopBufferHeight = this._first * this.itemHeight; + this._topBufferHeight = adjustedTopBufferHeight; - this.scrollContainer.scrollTop = 0; - this._first = 0; + this._bottomBufferHeight = newBottomBufferHeight - adjustedTopBufferHeight; + if (this._bottomBufferHeight < 0) { + this._bottomBufferHeight = 0; + } + } + this._adjustBufferHeights(); return; }; diff --git a/dist/es2015/array-virtual-repeat-strategy.js b/dist/es2015/array-virtual-repeat-strategy.js index 291f703..8ba896f 100644 --- a/dist/es2015/array-virtual-repeat-strategy.js +++ b/dist/es2015/array-virtual-repeat-strategy.js @@ -7,8 +7,8 @@ export let ArrayVirtualRepeatStrategy = class ArrayVirtualRepeatStrategy extends repeat.addView(overrideContext.bindingContext, overrideContext); } - instanceChanged(repeat, items) { - this._inPlaceProcessItems(repeat, items); + instanceChanged(repeat, items, ...rest) { + this._inPlaceProcessItems(repeat, items, rest[0]); } _standardProcessInstanceChanged(repeat, items) { @@ -18,10 +18,9 @@ export let ArrayVirtualRepeatStrategy = class ArrayVirtualRepeatStrategy extends } } - _inPlaceProcessItems(repeat, items) { + _inPlaceProcessItems(repeat, items, first) { let itemsLength = items.length; let viewsLength = repeat.viewCount(); - let first = repeat._getIndexOfFirstView(); while (viewsLength > itemsLength) { viewsLength--; @@ -42,6 +41,7 @@ export let ArrayVirtualRepeatStrategy = class ArrayVirtualRepeatStrategy extends view.bindingContext[local] = items[i + first]; view.overrideContext.$middle = middle; view.overrideContext.$last = last; + view.overrideContext.$index = i + first; repeat.updateBindings(view); } diff --git a/dist/es2015/template-strategy.js b/dist/es2015/template-strategy.js index 76cf721..45fc3e7 100644 --- a/dist/es2015/template-strategy.js +++ b/dist/es2015/template-strategy.js @@ -81,7 +81,7 @@ export let TableStrategy = (_dec2 = inject(DomHelper), _dec2(_class2 = class Tab getFirstElement(topBuffer) { const tbody = this._getTbodyElement(DOM.nextElementSibling(topBuffer)); const tr = tbody.firstChild; - return DOM.nextElementSibling(tr); + return tr; } getLastElement(bottomBuffer) { diff --git a/dist/es2015/virtual-repeat.js b/dist/es2015/virtual-repeat.js index f670ffd..6b28707 100644 --- a/dist/es2015/virtual-repeat.js +++ b/dist/es2015/virtual-repeat.js @@ -115,6 +115,7 @@ export let VirtualRepeat = (_dec = customAttribute('virtual-repeat'), _dec2 = in }, 500); this.distanceToTop = this.domHelper.getElementDistanceToTopOfDocument(this.templateStrategy.getFirstElement(this.topBuffer)); + this.topBufferDistance = this.templateStrategy.getTopBufferDistance(this.topBuffer); if (this.domHelper.hasOverflowScroll(this.scrollContainer)) { @@ -169,17 +170,44 @@ export let VirtualRepeat = (_dec = customAttribute('virtual-repeat'), _dec2 = in if (!this.scope) { return; } + let reducingItems = false; + let previousLastViewIndex = this._getIndexOfLastView(); + let items = this.items; this.strategy = this.strategyLocator.getStrategy(items); if (items.length > 0 && this.viewCount() === 0) { this.strategy.createFirstItem(this); } + + if (this._itemsLength >= items.length) { + this._skipNextScrollHandle = true; + reducingItems = true; + } + this._checkFixedHeightContainer(); this._calcInitialHeights(items.length); if (!this.isOneTime && !this._observeInnerCollection()) { this._observeCollection(); } + this.strategy.instanceChanged(this, items, this._first); + this._lastRebind = this._first; + + if (reducingItems && previousLastViewIndex > this.items.length - 1) { + if (this.scrollContainer.tagName === 'TBODY') { + let realScrollContainer = this.scrollContainer.parentNode.parentNode; + realScrollContainer.scrollTop = realScrollContainer.scrollTop + this.viewCount() * this.itemHeight; + } else { + this.scrollContainer.scrollTop = this.scrollContainer.scrollTop + this.viewCount() * this.itemHeight; + } + } + if (!reducingItems) { + this._previousFirst = this._first; + this._scrollingDown = true; + this._scrollingUp = false; - this.strategy.instanceChanged(this, items, this._viewsLength); + this.isLastIndex = this._getIndexOfLastView() >= this.items.length - 1; + } + + this._handleScroll(); } unbind() { @@ -224,6 +252,10 @@ export let VirtualRepeat = (_dec = customAttribute('virtual-repeat'), _dec2 = in if (!this._isAttached) { return; } + if (this._skipNextScrollHandle) { + this._skipNextScrollHandle = false; + return; + } let itemHeight = this.itemHeight; let scrollTop = this._fixedHeightContainer ? this.scrollContainer.scrollTop : pageYOffset - this.distanceToTop; this._first = Math.floor(scrollTop / itemHeight); @@ -355,6 +387,12 @@ export let VirtualRepeat = (_dec = customAttribute('virtual-repeat'), _dec2 = in } } + _checkFixedHeightContainer() { + if (this.domHelper.hasOverflowScroll(this.scrollContainer)) { + this._fixedHeightContainer = true; + } + } + _adjustBufferHeights() { this.topBuffer.style.height = `${ this._topBufferHeight }px`; this.bottomBuffer.style.height = `${ this._bottomBufferHeight }px`; @@ -431,20 +469,34 @@ export let VirtualRepeat = (_dec = customAttribute('virtual-repeat'), _dec2 = in }, 500); return; } + this._itemsLength = itemsLength; this.scrollContainerHeight = this._fixedHeightContainer ? this._calcScrollHeight(this.scrollContainer) : document.documentElement.clientHeight; this.elementsInView = Math.ceil(this.scrollContainerHeight / this.itemHeight) + 1; this._viewsLength = this.elementsInView * 2 + this._bufferSize; - this._bottomBufferHeight = this.itemHeight * itemsLength - this.itemHeight * this._viewsLength; - if (this._bottomBufferHeight < 0) { - this._bottomBufferHeight = 0; + + let newBottomBufferHeight = this.itemHeight * itemsLength - this.itemHeight * this._viewsLength; + if (newBottomBufferHeight < 0) { + newBottomBufferHeight = 0; } - this.bottomBuffer.style.height = `${ this._bottomBufferHeight }px`; - this._topBufferHeight = 0; - this.topBuffer.style.height = `${ this._topBufferHeight }px`; + if (this._topBufferHeight >= newBottomBufferHeight) { + this._topBufferHeight = newBottomBufferHeight; + this._bottomBufferHeight = 0; + this._first = this._itemsLength - this._viewsLength; + if (this._first < 0) { + this._first = 0; + } + } else { + this._first = this._getIndexOfFirstView(); + let adjustedTopBufferHeight = this._first * this.itemHeight; + this._topBufferHeight = adjustedTopBufferHeight; - this.scrollContainer.scrollTop = 0; - this._first = 0; + this._bottomBufferHeight = newBottomBufferHeight - adjustedTopBufferHeight; + if (this._bottomBufferHeight < 0) { + this._bottomBufferHeight = 0; + } + } + this._adjustBufferHeights(); return; } diff --git a/dist/native-modules/array-virtual-repeat-strategy.js b/dist/native-modules/array-virtual-repeat-strategy.js index 762f0b7..505031f 100644 --- a/dist/native-modules/array-virtual-repeat-strategy.js +++ b/dist/native-modules/array-virtual-repeat-strategy.js @@ -22,7 +22,7 @@ export var ArrayVirtualRepeatStrategy = function (_ArrayRepeatStrategy) { }; ArrayVirtualRepeatStrategy.prototype.instanceChanged = function instanceChanged(repeat, items) { - this._inPlaceProcessItems(repeat, items); + this._inPlaceProcessItems(repeat, items, arguments.length <= 2 ? undefined : arguments[2]); }; ArrayVirtualRepeatStrategy.prototype._standardProcessInstanceChanged = function _standardProcessInstanceChanged(repeat, items) { @@ -32,10 +32,9 @@ export var ArrayVirtualRepeatStrategy = function (_ArrayRepeatStrategy) { } }; - ArrayVirtualRepeatStrategy.prototype._inPlaceProcessItems = function _inPlaceProcessItems(repeat, items) { + ArrayVirtualRepeatStrategy.prototype._inPlaceProcessItems = function _inPlaceProcessItems(repeat, items, first) { var itemsLength = items.length; var viewsLength = repeat.viewCount(); - var first = repeat._getIndexOfFirstView(); while (viewsLength > itemsLength) { viewsLength--; @@ -56,6 +55,7 @@ export var ArrayVirtualRepeatStrategy = function (_ArrayRepeatStrategy) { view.bindingContext[local] = items[i + first]; view.overrideContext.$middle = middle; view.overrideContext.$last = last; + view.overrideContext.$index = i + first; repeat.updateBindings(view); } diff --git a/dist/native-modules/template-strategy.js b/dist/native-modules/template-strategy.js index 908e0a2..cc0c2bb 100644 --- a/dist/native-modules/template-strategy.js +++ b/dist/native-modules/template-strategy.js @@ -87,7 +87,7 @@ export var TableStrategy = (_dec2 = inject(DomHelper), _dec2(_class2 = function TableStrategy.prototype.getFirstElement = function getFirstElement(topBuffer) { var tbody = this._getTbodyElement(DOM.nextElementSibling(topBuffer)); var tr = tbody.firstChild; - return DOM.nextElementSibling(tr); + return tr; }; TableStrategy.prototype.getLastElement = function getLastElement(bottomBuffer) { diff --git a/dist/native-modules/virtual-repeat.js b/dist/native-modules/virtual-repeat.js index b931190..ce48cfe 100644 --- a/dist/native-modules/virtual-repeat.js +++ b/dist/native-modules/virtual-repeat.js @@ -130,6 +130,7 @@ export var VirtualRepeat = (_dec = customAttribute('virtual-repeat'), _dec2 = in }, 500); this.distanceToTop = this.domHelper.getElementDistanceToTopOfDocument(this.templateStrategy.getFirstElement(this.topBuffer)); + this.topBufferDistance = this.templateStrategy.getTopBufferDistance(this.topBuffer); if (this.domHelper.hasOverflowScroll(this.scrollContainer)) { @@ -184,17 +185,44 @@ export var VirtualRepeat = (_dec = customAttribute('virtual-repeat'), _dec2 = in if (!this.scope) { return; } + var reducingItems = false; + var previousLastViewIndex = this._getIndexOfLastView(); + var items = this.items; this.strategy = this.strategyLocator.getStrategy(items); if (items.length > 0 && this.viewCount() === 0) { this.strategy.createFirstItem(this); } + + if (this._itemsLength >= items.length) { + this._skipNextScrollHandle = true; + reducingItems = true; + } + this._checkFixedHeightContainer(); this._calcInitialHeights(items.length); if (!this.isOneTime && !this._observeInnerCollection()) { this._observeCollection(); } + this.strategy.instanceChanged(this, items, this._first); + this._lastRebind = this._first; + + if (reducingItems && previousLastViewIndex > this.items.length - 1) { + if (this.scrollContainer.tagName === 'TBODY') { + var realScrollContainer = this.scrollContainer.parentNode.parentNode; + realScrollContainer.scrollTop = realScrollContainer.scrollTop + this.viewCount() * this.itemHeight; + } else { + this.scrollContainer.scrollTop = this.scrollContainer.scrollTop + this.viewCount() * this.itemHeight; + } + } + if (!reducingItems) { + this._previousFirst = this._first; + this._scrollingDown = true; + this._scrollingUp = false; - this.strategy.instanceChanged(this, items, this._viewsLength); + this.isLastIndex = this._getIndexOfLastView() >= this.items.length - 1; + } + + this._handleScroll(); }; VirtualRepeat.prototype.unbind = function unbind() { @@ -247,6 +275,10 @@ export var VirtualRepeat = (_dec = customAttribute('virtual-repeat'), _dec2 = in if (!this._isAttached) { return; } + if (this._skipNextScrollHandle) { + this._skipNextScrollHandle = false; + return; + } var itemHeight = this.itemHeight; var scrollTop = this._fixedHeightContainer ? this.scrollContainer.scrollTop : pageYOffset - this.distanceToTop; this._first = Math.floor(scrollTop / itemHeight); @@ -380,6 +412,12 @@ export var VirtualRepeat = (_dec = customAttribute('virtual-repeat'), _dec2 = in } }; + VirtualRepeat.prototype._checkFixedHeightContainer = function _checkFixedHeightContainer() { + if (this.domHelper.hasOverflowScroll(this.scrollContainer)) { + this._fixedHeightContainer = true; + } + }; + VirtualRepeat.prototype._adjustBufferHeights = function _adjustBufferHeights() { this.topBuffer.style.height = this._topBufferHeight + 'px'; this.bottomBuffer.style.height = this._bottomBufferHeight + 'px'; @@ -466,20 +504,34 @@ export var VirtualRepeat = (_dec = customAttribute('virtual-repeat'), _dec2 = in }, 500); return; } + this._itemsLength = itemsLength; this.scrollContainerHeight = this._fixedHeightContainer ? this._calcScrollHeight(this.scrollContainer) : document.documentElement.clientHeight; this.elementsInView = Math.ceil(this.scrollContainerHeight / this.itemHeight) + 1; this._viewsLength = this.elementsInView * 2 + this._bufferSize; - this._bottomBufferHeight = this.itemHeight * itemsLength - this.itemHeight * this._viewsLength; - if (this._bottomBufferHeight < 0) { - this._bottomBufferHeight = 0; + + var newBottomBufferHeight = this.itemHeight * itemsLength - this.itemHeight * this._viewsLength; + if (newBottomBufferHeight < 0) { + newBottomBufferHeight = 0; } - this.bottomBuffer.style.height = this._bottomBufferHeight + 'px'; - this._topBufferHeight = 0; - this.topBuffer.style.height = this._topBufferHeight + 'px'; + if (this._topBufferHeight >= newBottomBufferHeight) { + this._topBufferHeight = newBottomBufferHeight; + this._bottomBufferHeight = 0; + this._first = this._itemsLength - this._viewsLength; + if (this._first < 0) { + this._first = 0; + } + } else { + this._first = this._getIndexOfFirstView(); + var adjustedTopBufferHeight = this._first * this.itemHeight; + this._topBufferHeight = adjustedTopBufferHeight; - this.scrollContainer.scrollTop = 0; - this._first = 0; + this._bottomBufferHeight = newBottomBufferHeight - adjustedTopBufferHeight; + if (this._bottomBufferHeight < 0) { + this._bottomBufferHeight = 0; + } + } + this._adjustBufferHeights(); return; }; diff --git a/dist/system/array-virtual-repeat-strategy.js b/dist/system/array-virtual-repeat-strategy.js index c466aaa..a468d3c 100644 --- a/dist/system/array-virtual-repeat-strategy.js +++ b/dist/system/array-virtual-repeat-strategy.js @@ -56,7 +56,7 @@ System.register(['aurelia-templating-resources', './utilities'], function (_expo }; ArrayVirtualRepeatStrategy.prototype.instanceChanged = function instanceChanged(repeat, items) { - this._inPlaceProcessItems(repeat, items); + this._inPlaceProcessItems(repeat, items, arguments.length <= 2 ? undefined : arguments[2]); }; ArrayVirtualRepeatStrategy.prototype._standardProcessInstanceChanged = function _standardProcessInstanceChanged(repeat, items) { @@ -66,10 +66,9 @@ System.register(['aurelia-templating-resources', './utilities'], function (_expo } }; - ArrayVirtualRepeatStrategy.prototype._inPlaceProcessItems = function _inPlaceProcessItems(repeat, items) { + ArrayVirtualRepeatStrategy.prototype._inPlaceProcessItems = function _inPlaceProcessItems(repeat, items, first) { var itemsLength = items.length; var viewsLength = repeat.viewCount(); - var first = repeat._getIndexOfFirstView(); while (viewsLength > itemsLength) { viewsLength--; @@ -90,6 +89,7 @@ System.register(['aurelia-templating-resources', './utilities'], function (_expo view.bindingContext[local] = items[i + first]; view.overrideContext.$middle = middle; view.overrideContext.$last = last; + view.overrideContext.$index = i + first; repeat.updateBindings(view); } diff --git a/dist/system/template-strategy.js b/dist/system/template-strategy.js index 2339d66..a1cd69a 100644 --- a/dist/system/template-strategy.js +++ b/dist/system/template-strategy.js @@ -102,7 +102,7 @@ System.register(['aurelia-dependency-injection', 'aurelia-pal', 'aurelia-templat TableStrategy.prototype.getFirstElement = function getFirstElement(topBuffer) { var tbody = this._getTbodyElement(DOM.nextElementSibling(topBuffer)); var tr = tbody.firstChild; - return DOM.nextElementSibling(tr); + return tr; }; TableStrategy.prototype.getLastElement = function getLastElement(bottomBuffer) { diff --git a/dist/system/virtual-repeat.js b/dist/system/virtual-repeat.js index 7fae8fc..25a380e 100644 --- a/dist/system/virtual-repeat.js +++ b/dist/system/virtual-repeat.js @@ -180,6 +180,7 @@ System.register(['aurelia-dependency-injection', 'aurelia-binding', 'aurelia-tem }, 500); this.distanceToTop = this.domHelper.getElementDistanceToTopOfDocument(this.templateStrategy.getFirstElement(this.topBuffer)); + this.topBufferDistance = this.templateStrategy.getTopBufferDistance(this.topBuffer); if (this.domHelper.hasOverflowScroll(this.scrollContainer)) { @@ -234,17 +235,44 @@ System.register(['aurelia-dependency-injection', 'aurelia-binding', 'aurelia-tem if (!this.scope) { return; } + var reducingItems = false; + var previousLastViewIndex = this._getIndexOfLastView(); + var items = this.items; this.strategy = this.strategyLocator.getStrategy(items); if (items.length > 0 && this.viewCount() === 0) { this.strategy.createFirstItem(this); } + + if (this._itemsLength >= items.length) { + this._skipNextScrollHandle = true; + reducingItems = true; + } + this._checkFixedHeightContainer(); this._calcInitialHeights(items.length); if (!this.isOneTime && !this._observeInnerCollection()) { this._observeCollection(); } + this.strategy.instanceChanged(this, items, this._first); + this._lastRebind = this._first; + + if (reducingItems && previousLastViewIndex > this.items.length - 1) { + if (this.scrollContainer.tagName === 'TBODY') { + var realScrollContainer = this.scrollContainer.parentNode.parentNode; + realScrollContainer.scrollTop = realScrollContainer.scrollTop + this.viewCount() * this.itemHeight; + } else { + this.scrollContainer.scrollTop = this.scrollContainer.scrollTop + this.viewCount() * this.itemHeight; + } + } + if (!reducingItems) { + this._previousFirst = this._first; + this._scrollingDown = true; + this._scrollingUp = false; - this.strategy.instanceChanged(this, items, this._viewsLength); + this.isLastIndex = this._getIndexOfLastView() >= this.items.length - 1; + } + + this._handleScroll(); }; VirtualRepeat.prototype.unbind = function unbind() { @@ -297,6 +325,10 @@ System.register(['aurelia-dependency-injection', 'aurelia-binding', 'aurelia-tem if (!this._isAttached) { return; } + if (this._skipNextScrollHandle) { + this._skipNextScrollHandle = false; + return; + } var itemHeight = this.itemHeight; var scrollTop = this._fixedHeightContainer ? this.scrollContainer.scrollTop : pageYOffset - this.distanceToTop; this._first = Math.floor(scrollTop / itemHeight); @@ -430,6 +462,12 @@ System.register(['aurelia-dependency-injection', 'aurelia-binding', 'aurelia-tem } }; + VirtualRepeat.prototype._checkFixedHeightContainer = function _checkFixedHeightContainer() { + if (this.domHelper.hasOverflowScroll(this.scrollContainer)) { + this._fixedHeightContainer = true; + } + }; + VirtualRepeat.prototype._adjustBufferHeights = function _adjustBufferHeights() { this.topBuffer.style.height = this._topBufferHeight + 'px'; this.bottomBuffer.style.height = this._bottomBufferHeight + 'px'; @@ -516,20 +554,34 @@ System.register(['aurelia-dependency-injection', 'aurelia-binding', 'aurelia-tem }, 500); return; } + this._itemsLength = itemsLength; this.scrollContainerHeight = this._fixedHeightContainer ? this._calcScrollHeight(this.scrollContainer) : document.documentElement.clientHeight; this.elementsInView = Math.ceil(this.scrollContainerHeight / this.itemHeight) + 1; this._viewsLength = this.elementsInView * 2 + this._bufferSize; - this._bottomBufferHeight = this.itemHeight * itemsLength - this.itemHeight * this._viewsLength; - if (this._bottomBufferHeight < 0) { - this._bottomBufferHeight = 0; + + var newBottomBufferHeight = this.itemHeight * itemsLength - this.itemHeight * this._viewsLength; + if (newBottomBufferHeight < 0) { + newBottomBufferHeight = 0; } - this.bottomBuffer.style.height = this._bottomBufferHeight + 'px'; - this._topBufferHeight = 0; - this.topBuffer.style.height = this._topBufferHeight + 'px'; + if (this._topBufferHeight >= newBottomBufferHeight) { + this._topBufferHeight = newBottomBufferHeight; + this._bottomBufferHeight = 0; + this._first = this._itemsLength - this._viewsLength; + if (this._first < 0) { + this._first = 0; + } + } else { + this._first = this._getIndexOfFirstView(); + var adjustedTopBufferHeight = this._first * this.itemHeight; + this._topBufferHeight = adjustedTopBufferHeight; - this.scrollContainer.scrollTop = 0; - this._first = 0; + this._bottomBufferHeight = newBottomBufferHeight - adjustedTopBufferHeight; + if (this._bottomBufferHeight < 0) { + this._bottomBufferHeight = 0; + } + } + this._adjustBufferHeights(); return; }; diff --git a/dist/temp/aurelia-ui-virtualization.js b/dist/temp/aurelia-ui-virtualization.js index c0f95d1..0854884 100644 --- a/dist/temp/aurelia-ui-virtualization.js +++ b/dist/temp/aurelia-ui-virtualization.js @@ -183,7 +183,7 @@ var ArrayVirtualRepeatStrategy = exports.ArrayVirtualRepeatStrategy = function ( }; ArrayVirtualRepeatStrategy.prototype.instanceChanged = function instanceChanged(repeat, items) { - this._inPlaceProcessItems(repeat, items); + this._inPlaceProcessItems(repeat, items, arguments.length <= 2 ? undefined : arguments[2]); }; ArrayVirtualRepeatStrategy.prototype._standardProcessInstanceChanged = function _standardProcessInstanceChanged(repeat, items) { @@ -193,10 +193,9 @@ var ArrayVirtualRepeatStrategy = exports.ArrayVirtualRepeatStrategy = function ( } }; - ArrayVirtualRepeatStrategy.prototype._inPlaceProcessItems = function _inPlaceProcessItems(repeat, items) { + ArrayVirtualRepeatStrategy.prototype._inPlaceProcessItems = function _inPlaceProcessItems(repeat, items, first) { var itemsLength = items.length; var viewsLength = repeat.viewCount(); - var first = repeat._getIndexOfFirstView(); while (viewsLength > itemsLength) { viewsLength--; @@ -217,6 +216,7 @@ var ArrayVirtualRepeatStrategy = exports.ArrayVirtualRepeatStrategy = function ( _view.bindingContext[local] = items[i + first]; _view.overrideContext.$middle = middle; _view.overrideContext.$last = last; + _view.overrideContext.$index = i + first; repeat.updateBindings(_view); } @@ -518,7 +518,7 @@ var TableStrategy = exports.TableStrategy = (_dec3 = (0, _aureliaDependencyInjec TableStrategy.prototype.getFirstElement = function getFirstElement(topBuffer) { var tbody = this._getTbodyElement(_aureliaPal.DOM.nextElementSibling(topBuffer)); var tr = tbody.firstChild; - return _aureliaPal.DOM.nextElementSibling(tr); + return tr; }; TableStrategy.prototype.getLastElement = function getLastElement(bottomBuffer) { @@ -691,6 +691,7 @@ var VirtualRepeat = exports.VirtualRepeat = (_dec4 = (0, _aureliaTemplating.cust }, 500); this.distanceToTop = this.domHelper.getElementDistanceToTopOfDocument(this.templateStrategy.getFirstElement(this.topBuffer)); + this.topBufferDistance = this.templateStrategy.getTopBufferDistance(this.topBuffer); if (this.domHelper.hasOverflowScroll(this.scrollContainer)) { @@ -745,17 +746,44 @@ var VirtualRepeat = exports.VirtualRepeat = (_dec4 = (0, _aureliaTemplating.cust if (!this.scope) { return; } + var reducingItems = false; + var previousLastViewIndex = this._getIndexOfLastView(); + var items = this.items; this.strategy = this.strategyLocator.getStrategy(items); if (items.length > 0 && this.viewCount() === 0) { this.strategy.createFirstItem(this); } + + if (this._itemsLength >= items.length) { + this._skipNextScrollHandle = true; + reducingItems = true; + } + this._checkFixedHeightContainer(); this._calcInitialHeights(items.length); if (!this.isOneTime && !this._observeInnerCollection()) { this._observeCollection(); } + this.strategy.instanceChanged(this, items, this._first); + this._lastRebind = this._first; + + if (reducingItems && previousLastViewIndex > this.items.length - 1) { + if (this.scrollContainer.tagName === 'TBODY') { + var realScrollContainer = this.scrollContainer.parentNode.parentNode; + realScrollContainer.scrollTop = realScrollContainer.scrollTop + this.viewCount() * this.itemHeight; + } else { + this.scrollContainer.scrollTop = this.scrollContainer.scrollTop + this.viewCount() * this.itemHeight; + } + } + if (!reducingItems) { + this._previousFirst = this._first; + this._scrollingDown = true; + this._scrollingUp = false; - this.strategy.instanceChanged(this, items, this._viewsLength); + this.isLastIndex = this._getIndexOfLastView() >= this.items.length - 1; + } + + this._handleScroll(); }; VirtualRepeat.prototype.unbind = function unbind() { @@ -808,6 +836,10 @@ var VirtualRepeat = exports.VirtualRepeat = (_dec4 = (0, _aureliaTemplating.cust if (!this._isAttached) { return; } + if (this._skipNextScrollHandle) { + this._skipNextScrollHandle = false; + return; + } var itemHeight = this.itemHeight; var scrollTop = this._fixedHeightContainer ? this.scrollContainer.scrollTop : pageYOffset - this.distanceToTop; this._first = Math.floor(scrollTop / itemHeight); @@ -941,6 +973,12 @@ var VirtualRepeat = exports.VirtualRepeat = (_dec4 = (0, _aureliaTemplating.cust } }; + VirtualRepeat.prototype._checkFixedHeightContainer = function _checkFixedHeightContainer() { + if (this.domHelper.hasOverflowScroll(this.scrollContainer)) { + this._fixedHeightContainer = true; + } + }; + VirtualRepeat.prototype._adjustBufferHeights = function _adjustBufferHeights() { this.topBuffer.style.height = this._topBufferHeight + 'px'; this.bottomBuffer.style.height = this._bottomBufferHeight + 'px'; @@ -1027,20 +1065,34 @@ var VirtualRepeat = exports.VirtualRepeat = (_dec4 = (0, _aureliaTemplating.cust }, 500); return; } + this._itemsLength = itemsLength; this.scrollContainerHeight = this._fixedHeightContainer ? this._calcScrollHeight(this.scrollContainer) : document.documentElement.clientHeight; this.elementsInView = Math.ceil(this.scrollContainerHeight / this.itemHeight) + 1; this._viewsLength = this.elementsInView * 2 + this._bufferSize; - this._bottomBufferHeight = this.itemHeight * itemsLength - this.itemHeight * this._viewsLength; - if (this._bottomBufferHeight < 0) { - this._bottomBufferHeight = 0; + + var newBottomBufferHeight = this.itemHeight * itemsLength - this.itemHeight * this._viewsLength; + if (newBottomBufferHeight < 0) { + newBottomBufferHeight = 0; } - this.bottomBuffer.style.height = this._bottomBufferHeight + 'px'; - this._topBufferHeight = 0; - this.topBuffer.style.height = this._topBufferHeight + 'px'; + if (this._topBufferHeight >= newBottomBufferHeight) { + this._topBufferHeight = newBottomBufferHeight; + this._bottomBufferHeight = 0; + this._first = this._itemsLength - this._viewsLength; + if (this._first < 0) { + this._first = 0; + } + } else { + this._first = this._getIndexOfFirstView(); + var adjustedTopBufferHeight = this._first * this.itemHeight; + this._topBufferHeight = adjustedTopBufferHeight; - this.scrollContainer.scrollTop = 0; - this._first = 0; + this._bottomBufferHeight = newBottomBufferHeight - adjustedTopBufferHeight; + if (this._bottomBufferHeight < 0) { + this._bottomBufferHeight = 0; + } + } + this._adjustBufferHeights(); return; }; diff --git a/doc/CHANGELOG.md b/doc/CHANGELOG.md index 90f37ad..2a78439 100644 --- a/doc/CHANGELOG.md +++ b/doc/CHANGELOG.md @@ -1,3 +1,13 @@ + +# [1.0.0-beta.3.1.0](https://github.com/aurelia/ui-virtualization/compare/1.0.0-beta.3.0.2...v1.0.0-beta.3.1.0) (2017-04-07) + + +### Bug Fixes + +* **virtual-repeat:** handle array changes correctly ([b861aa6](https://github.com/aurelia/ui-virtualization/commit/b861aa6)) + + + # [1.0.0-beta.3.0.2](https://github.com/aurelia/ui-virtualization/compare/1.0.0-beta.3.0.1...v1.0.0-beta.3.0.2) (2016-12-07) diff --git a/doc/api.json b/doc/api.json index 5961b27..1296daa 100644 --- a/doc/api.json +++ b/doc/api.json @@ -1 +1 @@ -{"name":"aurelia-ui-virtualization","children":[{"id":50,"name":"ArrayVirtualRepeatStrategy","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"A strategy for repeating a template over an array."},"children":[{"id":51,"name":"createFirstItem","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":52,"name":"createFirstItem","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":53,"name":"repeat","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"VirtualRepeat","id":155}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":74,"character":17}]},{"id":63,"name":"getCollectionObserver","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":64,"name":"getCollectionObserver","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets an observer for the specified collection."},"parameters":[{"id":65,"name":"observerLocator","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The observer locator instance."},"type":{"type":"instrinct","name":"any"}},{"id":66,"name":"items","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The items to be observed.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"ArrayRepeatStrategy.getCollectionObserver"}}],"sources":[{"fileName":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/ui-virtualization/node_modules/aurelia-templating-resources/dist/aurelia-templating-resources.d.ts","line":460,"character":23}],"inheritedFrom":{"type":"reference","name":"ArrayRepeatStrategy.getCollectionObserver"}},{"id":54,"name":"instanceChanged","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":55,"name":"instanceChanged","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Handle the repeat's collection instance changing."},"parameters":[{"id":56,"name":"repeat","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The repeater instance."},"type":{"type":"reference","name":"VirtualRepeat","id":155}},{"id":57,"name":"items","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The new array instance.\n"},"type":{"type":"reference","name":"Array","typeArguments":[{"type":"instrinct","name":"any"}]}}],"type":{"type":"instrinct","name":"void"},"overwrites":{"type":"reference","name":"ArrayRepeatStrategy.instanceChanged"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":81,"character":17}],"overwrites":{"type":"reference","name":"ArrayRepeatStrategy.instanceChanged"}},{"id":58,"name":"instanceMutated","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":59,"name":"instanceMutated","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Handle the repeat's collection instance mutating."},"parameters":[{"id":60,"name":"repeat","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The repeat instance."},"type":{"type":"reference","name":"VirtualRepeat","id":155}},{"id":61,"name":"array","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The modified array."},"type":{"type":"reference","name":"Array","typeArguments":[{"type":"instrinct","name":"any"}]}},{"id":62,"name":"splices","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"Records of array changes.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"overwrites":{"type":"reference","name":"ArrayRepeatStrategy.instanceMutated"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":89,"character":17}],"overwrites":{"type":"reference","name":"ArrayRepeatStrategy.instanceMutated"}}],"groups":[{"title":"Methods","kind":2048,"children":[51,63,54,58]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":71,"character":47}],"extendedTypes":[{"type":"reference","name":"ArrayRepeatStrategy"}]},{"id":110,"name":"DefaultTemplateStrategy","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":125,"name":"createBottomBufferElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":126,"name":"createBottomBufferElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":127,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":113,"character":27}]},{"id":122,"name":"createTopBufferElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":123,"name":"createTopBufferElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":124,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":112,"character":24}]},{"id":133,"name":"getFirstElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":134,"name":"getFirstElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":135,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":115,"character":17}]},{"id":136,"name":"getLastElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":137,"name":"getLastElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":138,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":116,"character":16}]},{"id":111,"name":"getScrollContainer","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":112,"name":"getScrollContainer","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":113,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":109,"character":20}]},{"id":139,"name":"getTopBufferDistance","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":140,"name":"getTopBufferDistance","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":141,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"number"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":117,"character":22}]},{"id":114,"name":"moveViewFirst","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":115,"name":"moveViewFirst","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":116,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}},{"id":117,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":110,"character":15}]},{"id":118,"name":"moveViewLast","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":119,"name":"moveViewLast","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":120,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}},{"id":121,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":111,"character":14}]},{"id":128,"name":"removeBufferElements","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":129,"name":"removeBufferElements","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":130,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":131,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":132,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":114,"character":22}]}],"groups":[{"title":"Methods","kind":2048,"children":[125,122,133,136,111,139,114,118,128]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":108,"character":44}]},{"id":34,"name":"DomHelper","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":35,"name":"getElementDistanceToTopOfDocument","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":36,"name":"getElementDistanceToTopOfDocument","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":37,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"number"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":45,"character":35}]},{"id":38,"name":"hasOverflowScroll","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":39,"name":"hasOverflowScroll","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":40,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":46,"character":19}]}],"groups":[{"title":"Methods","kind":2048,"children":[35,38]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":44,"character":30}]},{"id":41,"name":"InfiniteScrollNext","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":42,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":43,"name":"new InfiniteScrollNext","kind":16384,"kindString":"Constructor signature","flags":{},"type":{"type":"reference","name":"InfiniteScrollNext","id":41}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":50,"character":41}]},{"id":44,"name":"attached","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":45,"name":"attached","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":52,"character":10}]},{"id":46,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":47,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":48,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":49,"name":"overrideContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":53,"character":6}]}],"groups":[{"title":"Constructors","kind":512,"children":[42]},{"title":"Methods","kind":2048,"children":[44,46]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":50,"character":39}]},{"id":74,"name":"TableStrategy","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":76,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":77,"name":"new TableStrategy","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":78,"name":"domHelper","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"TableStrategy","id":74}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":96,"character":21}]},{"id":75,"name":"tableCssReset","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":96,"character":15}],"type":{"type":"instrinct","name":"any"}},{"id":93,"name":"createBottomBufferElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":94,"name":"createBottomBufferElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":95,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":102,"character":27}]},{"id":90,"name":"createTopBufferElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":91,"name":"createTopBufferElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":92,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":101,"character":24}]},{"id":101,"name":"getFirstElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":102,"name":"getFirstElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":103,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":104,"character":17}]},{"id":104,"name":"getLastElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":105,"name":"getLastElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":106,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":105,"character":16}]},{"id":79,"name":"getScrollContainer","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":80,"name":"getScrollContainer","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":81,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":98,"character":20}]},{"id":107,"name":"getTopBufferDistance","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":108,"name":"getTopBufferDistance","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":109,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"number"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":106,"character":22}]},{"id":82,"name":"moveViewFirst","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":83,"name":"moveViewFirst","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":84,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}},{"id":85,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":99,"character":15}]},{"id":86,"name":"moveViewLast","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":87,"name":"moveViewLast","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":88,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}},{"id":89,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":100,"character":14}]},{"id":96,"name":"removeBufferElements","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":97,"name":"removeBufferElements","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":98,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":99,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":100,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":103,"character":22}]}],"groups":[{"title":"Constructors","kind":512,"children":[76]},{"title":"Properties","kind":1024,"children":[75]},{"title":"Methods","kind":2048,"children":[93,90,101,104,79,107,82,86,96]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":95,"character":34}]},{"id":67,"name":"TemplateStrategyLocator","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":68,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":69,"name":"new TemplateStrategyLocator","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":70,"name":"container","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Container"}}],"type":{"type":"reference","name":"TemplateStrategyLocator","id":67}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":91,"character":46}]},{"id":71,"name":"getStrategy","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":72,"name":"getStrategy","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":73,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"TemplateStrategy","id":2}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":93,"character":13}]}],"groups":[{"title":"Constructors","kind":512,"children":[68]},{"title":"Methods","kind":2048,"children":[71]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":91,"character":44}]},{"id":155,"name":"VirtualRepeat","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":158,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":159,"name":"new VirtualRepeat","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":160,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":161,"name":"viewFactory","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"BoundViewFactory"}},{"id":162,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TargetInstruction"}},{"id":163,"name":"viewSlot","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ViewSlot"}},{"id":164,"name":"viewResources","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ViewResources"}},{"id":165,"name":"observerLocator","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ObserverLocator"}},{"id":166,"name":"strategyLocator","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"VirtualRepeatStrategyLocator","id":142}},{"id":167,"name":"templateStrategyLocator","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TemplateStrategyLocator","id":67}},{"id":168,"name":"domHelper","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"DomHelper","id":34}}],"type":{"type":"reference","name":"VirtualRepeat","id":155},"overwrites":{"type":"reference","name":"AbstractRepeater.__constructor"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":124,"character":13}],"overwrites":{"type":"reference","name":"AbstractRepeater.__constructor"}},{"id":156,"name":"items","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":123,"character":7}],"type":{"type":"instrinct","name":"any"}},{"id":157,"name":"local","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":124,"character":7}],"type":{"type":"instrinct","name":"any"}},{"id":200,"name":"addView","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":201,"name":"addView","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":202,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":203,"name":"overrideContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"overwrites":{"type":"reference","name":"AbstractRepeater.addView"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":139,"character":9}],"overwrites":{"type":"reference","name":"AbstractRepeater.addView"}},{"id":169,"name":"attached","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":170,"name":"attached","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":126,"character":10}]},{"id":171,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":172,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":173,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":174,"name":"overrideContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":127,"character":6}]},{"id":175,"name":"call","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":176,"name":"call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":177,"name":"context","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":178,"name":"changes","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":128,"character":6}]},{"id":179,"name":"detached","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":180,"name":"detached","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":129,"character":10}]},{"id":185,"name":"handleCollectionMutated","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":186,"name":"handleCollectionMutated","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":187,"name":"collection","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":188,"name":"changes","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":132,"character":25}]},{"id":189,"name":"handleInnerCollectionMutated","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":190,"name":"handleInnerCollectionMutated","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":191,"name":"collection","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":192,"name":"changes","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":133,"character":30}]},{"id":204,"name":"insertView","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":205,"name":"insertView","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":206,"name":"index","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":207,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":208,"name":"overrideContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"overwrites":{"type":"reference","name":"AbstractRepeater.insertView"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":140,"character":12}],"overwrites":{"type":"reference","name":"AbstractRepeater.insertView"}},{"id":181,"name":"itemsChanged","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":182,"name":"itemsChanged","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":130,"character":14}]},{"id":221,"name":"matcher","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":222,"name":"matcher","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Returns the matcher function to be used by the repeater, or null if strict matching is to be performed.","returns":"The requested matcher function.\n"},"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"AbstractRepeater.matcher"}}],"sources":[{"fileName":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/ui-virtualization/node_modules/aurelia-templating-resources/dist/aurelia-templating-resources.d.ts","line":384,"character":9}],"inheritedFrom":{"type":"reference","name":"AbstractRepeater.matcher"}},{"id":223,"name":"moveView","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":224,"name":"moveView","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Moves a view across the repeater."},"parameters":[{"id":225,"name":"sourceIndex","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"The index where the view should be placed at.\n"},"type":{"type":"instrinct","name":"any"}},{"id":226,"name":"targetIndex","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"AbstractRepeater.moveView"}}],"sources":[{"fileName":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/ui-virtualization/node_modules/aurelia-templating-resources/dist/aurelia-templating-resources.d.ts","line":411,"character":10}],"inheritedFrom":{"type":"reference","name":"AbstractRepeater.moveView"}},{"id":209,"name":"removeAllViews","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":210,"name":"removeAllViews","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":211,"name":"returnToCache","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":212,"name":"skipAnimation","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"overwrites":{"type":"reference","name":"AbstractRepeater.removeAllViews"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":141,"character":16}],"overwrites":{"type":"reference","name":"AbstractRepeater.removeAllViews"}},{"id":213,"name":"removeView","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":214,"name":"removeView","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":215,"name":"index","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":216,"name":"returnToCache","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":217,"name":"skipAnimation","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"overwrites":{"type":"reference","name":"AbstractRepeater.removeView"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":142,"character":12}],"overwrites":{"type":"reference","name":"AbstractRepeater.removeView"}},{"id":227,"name":"removeViews","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":228,"name":"removeViews","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes an array of Views from the repeater.","returns":"\n"},"parameters":[{"id":229,"name":"viewsToRemove","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The array of views to be removed."},"type":{"type":"reference","name":"Array","typeArguments":[{"type":"reference","name":"View"}]}},{"id":230,"name":"returnToCache","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Should the view be returned to the view cache?"},"type":{"type":"instrinct","name":"boolean"}},{"id":231,"name":"skipAnimation","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Should the removal animation be skipped?"},"type":{"type":"instrinct","name":"boolean"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"AbstractRepeater.removeViews"}}],"sources":[{"fileName":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/ui-virtualization/node_modules/aurelia-templating-resources/dist/aurelia-templating-resources.d.ts","line":429,"character":13}],"inheritedFrom":{"type":"reference","name":"AbstractRepeater.removeViews"}},{"id":183,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":184,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":131,"character":8}]},{"id":218,"name":"updateBindings","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":219,"name":"updateBindings","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":220,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}}],"type":{"type":"instrinct","name":"any"},"overwrites":{"type":"reference","name":"AbstractRepeater.updateBindings"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":143,"character":16}],"overwrites":{"type":"reference","name":"AbstractRepeater.updateBindings"}},{"id":197,"name":"view","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":198,"name":"view","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":199,"name":"index","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"overwrites":{"type":"reference","name":"AbstractRepeater.view"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":138,"character":6}],"overwrites":{"type":"reference","name":"AbstractRepeater.view"}},{"id":193,"name":"viewCount","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":194,"name":"viewCount","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"any"},"overwrites":{"type":"reference","name":"AbstractRepeater.viewCount"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":136,"character":11}],"overwrites":{"type":"reference","name":"AbstractRepeater.viewCount"}},{"id":195,"name":"views","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":196,"name":"views","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"any"},"overwrites":{"type":"reference","name":"AbstractRepeater.views"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":137,"character":7}],"overwrites":{"type":"reference","name":"AbstractRepeater.views"}}],"groups":[{"title":"Constructors","kind":512,"children":[158]},{"title":"Properties","kind":1024,"children":[156,157]},{"title":"Methods","kind":2048,"children":[200,169,171,175,179,185,189,204,181,221,223,209,213,227,183,218,197,193,195]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":122,"character":34}],"extendedTypes":[{"type":"reference","name":"AbstractRepeater"}]},{"id":142,"name":"VirtualRepeatStrategyLocator","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":143,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":144,"name":"new VirtualRepeatStrategyLocator","kind":16384,"kindString":"Constructor signature","flags":{},"type":{"type":"reference","name":"VirtualRepeatStrategyLocator","id":142},"overwrites":{"type":"reference","name":"RepeatStrategyLocator.__constructor"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":119,"character":81}],"overwrites":{"type":"reference","name":"RepeatStrategyLocator.__constructor"}},{"id":145,"name":"addStrategy","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":146,"name":"addStrategy","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds a repeat strategy to be located when repeating a template over different collection types."},"parameters":[{"id":147,"name":"matcher","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":148,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":149,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":150,"name":"items","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/ui-virtualization/node_modules/aurelia-templating-resources/dist/aurelia-templating-resources.d.ts","line":653,"character":22}]}}},{"id":151,"name":"strategy","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"A repeat strategy that can iterate a specific collection type.\n"},"type":{"type":"reference","name":"RepeatStrategy"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"RepeatStrategyLocator.addStrategy"}}],"sources":[{"fileName":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/ui-virtualization/node_modules/aurelia-templating-resources/dist/aurelia-templating-resources.d.ts","line":653,"character":13}],"inheritedFrom":{"type":"reference","name":"RepeatStrategyLocator.addStrategy"}},{"id":152,"name":"getStrategy","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":153,"name":"getStrategy","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets the best strategy to handle iteration."},"parameters":[{"id":154,"name":"items","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"RepeatStrategy"},"inheritedFrom":{"type":"reference","name":"RepeatStrategyLocator.getStrategy"}}],"sources":[{"fileName":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/ui-virtualization/node_modules/aurelia-templating-resources/dist/aurelia-templating-resources.d.ts","line":658,"character":13}],"inheritedFrom":{"type":"reference","name":"RepeatStrategyLocator.getStrategy"}}],"groups":[{"title":"Constructors","kind":512,"children":[143]},{"title":"Methods","kind":2048,"children":[145,152]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":119,"character":49}],"extendedTypes":[{"type":"reference","name":"RepeatStrategyLocator"}]},{"id":2,"name":"TemplateStrategy","kind":256,"kindString":"Interface","flags":{"isExported":true},"children":[{"id":17,"name":"createBottomBufferElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":18,"name":"createBottomBufferElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":19,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":38,"character":27}]},{"id":14,"name":"createTopBufferElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":15,"name":"createTopBufferElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":16,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":37,"character":24}]},{"id":25,"name":"getFirstElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":26,"name":"getFirstElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":27,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":40,"character":17}]},{"id":28,"name":"getLastView","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":29,"name":"getLastView","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":30,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":41,"character":13}]},{"id":3,"name":"getScrollContainer","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":4,"name":"getScrollContainer","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":5,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":34,"character":20}]},{"id":31,"name":"getTopBufferDistance","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":32,"name":"getTopBufferDistance","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":33,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"number"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":42,"character":22}]},{"id":6,"name":"moveViewFirst","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":7,"name":"moveViewFirst","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":8,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}},{"id":9,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":35,"character":15}]},{"id":10,"name":"moveViewLast","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":11,"name":"moveViewLast","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":12,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}},{"id":13,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":36,"character":14}]},{"id":20,"name":"removeBufferElements","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":21,"name":"removeBufferElements","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":22,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":23,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":24,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":39,"character":22}]}],"groups":[{"title":"Methods","kind":2048,"children":[17,14,25,28,3,31,6,10,20]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":33,"character":41}]},{"id":232,"name":"calcOuterHeight","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":233,"name":"calcOuterHeight","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":234,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"number"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":55,"character":39}]},{"id":253,"name":"getElementDistanceToBottomViewPort","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":254,"name":"getElementDistanceToBottomViewPort","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":255,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"number"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":65,"character":58}]},{"id":256,"name":"getElementDistanceToTopViewPort","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":257,"name":"getElementDistanceToTopViewPort","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":258,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"number"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":66,"character":55}]},{"id":249,"name":"getStyleValue","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":250,"name":"getStyleValue","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":251,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":252,"name":"style","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":64,"character":37}]},{"id":235,"name":"insertBeforeNode","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":236,"name":"insertBeforeNode","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":237,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}},{"id":238,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":56,"character":40}]},{"id":243,"name":"rebindAndMoveView","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":244,"name":"rebindAndMoveView","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":245,"name":"repeat","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"VirtualRepeat","id":155}},{"id":246,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}},{"id":247,"name":"index","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}},{"id":248,"name":"moveToBottom","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"boolean"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":63,"character":41}]},{"id":239,"name":"updateVirtualOverrideContexts","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":240,"name":"updateVirtualOverrideContexts","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Update the override context."},"parameters":[{"id":241,"name":"repeat","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"VirtualRepeat","id":155}},{"id":242,"name":"startIndex","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"index in collection where to start updating.\n"},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":62,"character":53}]}],"groups":[{"title":"Classes","kind":128,"children":[50,110,34,41,74,67,155,142]},{"title":"Interfaces","kind":256,"children":[2]},{"title":"Functions","kind":64,"children":[232,253,256,249,235,243,239]}]} \ No newline at end of file +{"name":"aurelia-ui-virtualization","children":[{"id":50,"name":"ArrayVirtualRepeatStrategy","kind":128,"kindString":"Class","flags":{"isExported":true},"comment":{"shortText":"A strategy for repeating a template over an array."},"children":[{"id":51,"name":"createFirstItem","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":52,"name":"createFirstItem","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":53,"name":"repeat","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"VirtualRepeat","id":156}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":74,"character":17}]},{"id":64,"name":"getCollectionObserver","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":65,"name":"getCollectionObserver","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets an observer for the specified collection."},"parameters":[{"id":66,"name":"observerLocator","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The observer locator instance."},"type":{"type":"instrinct","name":"any"}},{"id":67,"name":"items","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"The items to be observed.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"ArrayRepeatStrategy.getCollectionObserver"}}],"sources":[{"fileName":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/ui-virtualization/node_modules/aurelia-templating-resources/dist/aurelia-templating-resources.d.ts","line":460,"character":23}],"inheritedFrom":{"type":"reference","name":"ArrayRepeatStrategy.getCollectionObserver"}},{"id":54,"name":"instanceChanged","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":55,"name":"instanceChanged","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Handle the repeat's collection instance changing."},"parameters":[{"id":56,"name":"repeat","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The repeater instance."},"type":{"type":"reference","name":"VirtualRepeat","id":156}},{"id":57,"name":"items","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The new array instance.\n"},"type":{"type":"reference","name":"Array","typeArguments":[{"type":"instrinct","name":"any"}]}},{"id":58,"name":"rest","kind":32768,"kindString":"Parameter","flags":{"isRest":true},"type":{"type":"instrinct","isArray":true,"name":"any"}}],"type":{"type":"instrinct","name":"void"},"overwrites":{"type":"reference","name":"ArrayRepeatStrategy.instanceChanged"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":81,"character":17}],"overwrites":{"type":"reference","name":"ArrayRepeatStrategy.instanceChanged"}},{"id":59,"name":"instanceMutated","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":60,"name":"instanceMutated","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Handle the repeat's collection instance mutating."},"parameters":[{"id":61,"name":"repeat","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The repeat instance."},"type":{"type":"reference","name":"VirtualRepeat","id":156}},{"id":62,"name":"array","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The modified array."},"type":{"type":"reference","name":"Array","typeArguments":[{"type":"instrinct","name":"any"}]}},{"id":63,"name":"splices","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"Records of array changes.\n"},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"},"overwrites":{"type":"reference","name":"ArrayRepeatStrategy.instanceMutated"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":89,"character":17}],"overwrites":{"type":"reference","name":"ArrayRepeatStrategy.instanceMutated"}}],"groups":[{"title":"Methods","kind":2048,"children":[51,64,54,59]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":71,"character":47}],"extendedTypes":[{"type":"reference","name":"ArrayRepeatStrategy"}]},{"id":111,"name":"DefaultTemplateStrategy","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":126,"name":"createBottomBufferElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":127,"name":"createBottomBufferElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":128,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":113,"character":27}]},{"id":123,"name":"createTopBufferElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":124,"name":"createTopBufferElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":125,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":112,"character":24}]},{"id":134,"name":"getFirstElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":135,"name":"getFirstElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":136,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":115,"character":17}]},{"id":137,"name":"getLastElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":138,"name":"getLastElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":139,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":116,"character":16}]},{"id":112,"name":"getScrollContainer","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":113,"name":"getScrollContainer","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":114,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":109,"character":20}]},{"id":140,"name":"getTopBufferDistance","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":141,"name":"getTopBufferDistance","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":142,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"number"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":117,"character":22}]},{"id":115,"name":"moveViewFirst","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":116,"name":"moveViewFirst","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":117,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}},{"id":118,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":110,"character":15}]},{"id":119,"name":"moveViewLast","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":120,"name":"moveViewLast","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":121,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}},{"id":122,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":111,"character":14}]},{"id":129,"name":"removeBufferElements","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":130,"name":"removeBufferElements","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":131,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":132,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":133,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":114,"character":22}]}],"groups":[{"title":"Methods","kind":2048,"children":[126,123,134,137,112,140,115,119,129]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":108,"character":44}]},{"id":34,"name":"DomHelper","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":35,"name":"getElementDistanceToTopOfDocument","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":36,"name":"getElementDistanceToTopOfDocument","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":37,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"number"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":45,"character":35}]},{"id":38,"name":"hasOverflowScroll","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":39,"name":"hasOverflowScroll","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":40,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":46,"character":19}]}],"groups":[{"title":"Methods","kind":2048,"children":[35,38]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":44,"character":30}]},{"id":41,"name":"InfiniteScrollNext","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":42,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":43,"name":"new InfiniteScrollNext","kind":16384,"kindString":"Constructor signature","flags":{},"type":{"type":"reference","name":"InfiniteScrollNext","id":41}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":50,"character":41}]},{"id":44,"name":"attached","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":45,"name":"attached","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":52,"character":10}]},{"id":46,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":47,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":48,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":49,"name":"overrideContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":53,"character":6}]}],"groups":[{"title":"Constructors","kind":512,"children":[42]},{"title":"Methods","kind":2048,"children":[44,46]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":50,"character":39}]},{"id":75,"name":"TableStrategy","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":77,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":78,"name":"new TableStrategy","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":79,"name":"domHelper","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"TableStrategy","id":75}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":96,"character":21}]},{"id":76,"name":"tableCssReset","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":96,"character":15}],"type":{"type":"instrinct","name":"any"}},{"id":94,"name":"createBottomBufferElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":95,"name":"createBottomBufferElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":96,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":102,"character":27}]},{"id":91,"name":"createTopBufferElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":92,"name":"createTopBufferElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":93,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":101,"character":24}]},{"id":102,"name":"getFirstElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":103,"name":"getFirstElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":104,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":104,"character":17}]},{"id":105,"name":"getLastElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":106,"name":"getLastElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":107,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":105,"character":16}]},{"id":80,"name":"getScrollContainer","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":81,"name":"getScrollContainer","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":82,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":98,"character":20}]},{"id":108,"name":"getTopBufferDistance","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":109,"name":"getTopBufferDistance","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":110,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"number"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":106,"character":22}]},{"id":83,"name":"moveViewFirst","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":84,"name":"moveViewFirst","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":85,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}},{"id":86,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":99,"character":15}]},{"id":87,"name":"moveViewLast","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":88,"name":"moveViewLast","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":89,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}},{"id":90,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":100,"character":14}]},{"id":97,"name":"removeBufferElements","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":98,"name":"removeBufferElements","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":99,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":100,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":101,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":103,"character":22}]}],"groups":[{"title":"Constructors","kind":512,"children":[77]},{"title":"Properties","kind":1024,"children":[76]},{"title":"Methods","kind":2048,"children":[94,91,102,105,80,108,83,87,97]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":95,"character":34}]},{"id":68,"name":"TemplateStrategyLocator","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":69,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":70,"name":"new TemplateStrategyLocator","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":71,"name":"container","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Container"}}],"type":{"type":"reference","name":"TemplateStrategyLocator","id":68}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":91,"character":46}]},{"id":72,"name":"getStrategy","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":73,"name":"getStrategy","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":74,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"TemplateStrategy","id":2}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":93,"character":13}]}],"groups":[{"title":"Constructors","kind":512,"children":[69]},{"title":"Methods","kind":2048,"children":[72]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":91,"character":44}]},{"id":156,"name":"VirtualRepeat","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":159,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":160,"name":"new VirtualRepeat","kind":16384,"kindString":"Constructor signature","flags":{},"parameters":[{"id":161,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":162,"name":"viewFactory","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"BoundViewFactory"}},{"id":163,"name":"instruction","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TargetInstruction"}},{"id":164,"name":"viewSlot","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ViewSlot"}},{"id":165,"name":"viewResources","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ViewResources"}},{"id":166,"name":"observerLocator","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"ObserverLocator"}},{"id":167,"name":"strategyLocator","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"VirtualRepeatStrategyLocator","id":143}},{"id":168,"name":"templateStrategyLocator","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"TemplateStrategyLocator","id":68}},{"id":169,"name":"domHelper","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"DomHelper","id":34}}],"type":{"type":"reference","name":"VirtualRepeat","id":156},"overwrites":{"type":"reference","name":"AbstractRepeater.__constructor"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":124,"character":13}],"overwrites":{"type":"reference","name":"AbstractRepeater.__constructor"}},{"id":157,"name":"items","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":123,"character":7}],"type":{"type":"instrinct","name":"any"}},{"id":158,"name":"local","kind":1024,"kindString":"Property","flags":{"isExported":true},"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":124,"character":7}],"type":{"type":"instrinct","name":"any"}},{"id":201,"name":"addView","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":202,"name":"addView","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":203,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":204,"name":"overrideContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"overwrites":{"type":"reference","name":"AbstractRepeater.addView"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":140,"character":9}],"overwrites":{"type":"reference","name":"AbstractRepeater.addView"}},{"id":170,"name":"attached","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":171,"name":"attached","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":126,"character":10}]},{"id":172,"name":"bind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":173,"name":"bind","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":174,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":175,"name":"overrideContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":127,"character":6}]},{"id":176,"name":"call","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":177,"name":"call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":178,"name":"context","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":179,"name":"changes","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":128,"character":6}]},{"id":180,"name":"detached","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":181,"name":"detached","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":129,"character":10}]},{"id":186,"name":"handleCollectionMutated","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":187,"name":"handleCollectionMutated","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":188,"name":"collection","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":189,"name":"changes","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":132,"character":25}]},{"id":190,"name":"handleInnerCollectionMutated","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":191,"name":"handleInnerCollectionMutated","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":192,"name":"collection","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":193,"name":"changes","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":133,"character":30}]},{"id":205,"name":"insertView","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":206,"name":"insertView","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":207,"name":"index","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":208,"name":"bindingContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":209,"name":"overrideContext","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"overwrites":{"type":"reference","name":"AbstractRepeater.insertView"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":141,"character":12}],"overwrites":{"type":"reference","name":"AbstractRepeater.insertView"}},{"id":182,"name":"itemsChanged","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":183,"name":"itemsChanged","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":130,"character":14}]},{"id":222,"name":"matcher","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":223,"name":"matcher","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Returns the matcher function to be used by the repeater, or null if strict matching is to be performed.","returns":"The requested matcher function.\n"},"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"AbstractRepeater.matcher"}}],"sources":[{"fileName":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/ui-virtualization/node_modules/aurelia-templating-resources/dist/aurelia-templating-resources.d.ts","line":384,"character":9}],"inheritedFrom":{"type":"reference","name":"AbstractRepeater.matcher"}},{"id":224,"name":"moveView","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":225,"name":"moveView","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Moves a view across the repeater."},"parameters":[{"id":226,"name":"sourceIndex","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"shortText":"The index where the view should be placed at.\n"},"type":{"type":"instrinct","name":"any"}},{"id":227,"name":"targetIndex","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"AbstractRepeater.moveView"}}],"sources":[{"fileName":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/ui-virtualization/node_modules/aurelia-templating-resources/dist/aurelia-templating-resources.d.ts","line":411,"character":10}],"inheritedFrom":{"type":"reference","name":"AbstractRepeater.moveView"}},{"id":210,"name":"removeAllViews","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":211,"name":"removeAllViews","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":212,"name":"returnToCache","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":213,"name":"skipAnimation","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"overwrites":{"type":"reference","name":"AbstractRepeater.removeAllViews"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":142,"character":16}],"overwrites":{"type":"reference","name":"AbstractRepeater.removeAllViews"}},{"id":214,"name":"removeView","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":215,"name":"removeView","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":216,"name":"index","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":217,"name":"returnToCache","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}},{"id":218,"name":"skipAnimation","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"overwrites":{"type":"reference","name":"AbstractRepeater.removeView"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":143,"character":12}],"overwrites":{"type":"reference","name":"AbstractRepeater.removeView"}},{"id":228,"name":"removeViews","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":229,"name":"removeViews","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Removes an array of Views from the repeater.","returns":"\n"},"parameters":[{"id":230,"name":"viewsToRemove","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"The array of views to be removed."},"type":{"type":"reference","name":"Array","typeArguments":[{"type":"reference","name":"View"}]}},{"id":231,"name":"returnToCache","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Should the view be returned to the view cache?"},"type":{"type":"instrinct","name":"boolean"}},{"id":232,"name":"skipAnimation","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"comment":{"text":"Should the removal animation be skipped?"},"type":{"type":"instrinct","name":"boolean"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"AbstractRepeater.removeViews"}}],"sources":[{"fileName":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/ui-virtualization/node_modules/aurelia-templating-resources/dist/aurelia-templating-resources.d.ts","line":429,"character":13}],"inheritedFrom":{"type":"reference","name":"AbstractRepeater.removeViews"}},{"id":184,"name":"unbind","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":185,"name":"unbind","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":131,"character":8}]},{"id":219,"name":"updateBindings","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":220,"name":"updateBindings","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":221,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}}],"type":{"type":"instrinct","name":"any"},"overwrites":{"type":"reference","name":"AbstractRepeater.updateBindings"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":144,"character":16}],"overwrites":{"type":"reference","name":"AbstractRepeater.updateBindings"}},{"id":198,"name":"view","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":199,"name":"view","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":200,"name":"index","kind":32768,"kindString":"Parameter","flags":{"isOptional":true},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"any"},"overwrites":{"type":"reference","name":"AbstractRepeater.view"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":139,"character":6}],"overwrites":{"type":"reference","name":"AbstractRepeater.view"}},{"id":194,"name":"viewCount","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":195,"name":"viewCount","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"any"},"overwrites":{"type":"reference","name":"AbstractRepeater.viewCount"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":137,"character":11}],"overwrites":{"type":"reference","name":"AbstractRepeater.viewCount"}},{"id":196,"name":"views","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":197,"name":"views","kind":4096,"kindString":"Call signature","flags":{},"type":{"type":"instrinct","name":"any"},"overwrites":{"type":"reference","name":"AbstractRepeater.views"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":138,"character":7}],"overwrites":{"type":"reference","name":"AbstractRepeater.views"}}],"groups":[{"title":"Constructors","kind":512,"children":[159]},{"title":"Properties","kind":1024,"children":[157,158]},{"title":"Methods","kind":2048,"children":[201,170,172,176,180,186,190,205,182,222,224,210,214,228,184,219,198,194,196]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":122,"character":34}],"extendedTypes":[{"type":"reference","name":"AbstractRepeater"}]},{"id":143,"name":"VirtualRepeatStrategyLocator","kind":128,"kindString":"Class","flags":{"isExported":true},"children":[{"id":144,"name":"constructor","kind":512,"kindString":"Constructor","flags":{"isExported":true},"signatures":[{"id":145,"name":"new VirtualRepeatStrategyLocator","kind":16384,"kindString":"Constructor signature","flags":{},"type":{"type":"reference","name":"VirtualRepeatStrategyLocator","id":143},"overwrites":{"type":"reference","name":"RepeatStrategyLocator.__constructor"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":119,"character":81}],"overwrites":{"type":"reference","name":"RepeatStrategyLocator.__constructor"}},{"id":146,"name":"addStrategy","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":147,"name":"addStrategy","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Adds a repeat strategy to be located when repeating a template over different collection types."},"parameters":[{"id":148,"name":"matcher","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reflection","declaration":{"id":149,"name":"__type","kind":65536,"kindString":"Type literal","flags":{},"signatures":[{"id":150,"name":"__call","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":151,"name":"items","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"instrinct","name":"boolean"}}],"sources":[{"fileName":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/ui-virtualization/node_modules/aurelia-templating-resources/dist/aurelia-templating-resources.d.ts","line":653,"character":22}]}}},{"id":152,"name":"strategy","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"A repeat strategy that can iterate a specific collection type.\n"},"type":{"type":"reference","name":"RepeatStrategy"}}],"type":{"type":"instrinct","name":"any"},"inheritedFrom":{"type":"reference","name":"RepeatStrategyLocator.addStrategy"}}],"sources":[{"fileName":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/ui-virtualization/node_modules/aurelia-templating-resources/dist/aurelia-templating-resources.d.ts","line":653,"character":13}],"inheritedFrom":{"type":"reference","name":"RepeatStrategyLocator.addStrategy"}},{"id":153,"name":"getStrategy","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":154,"name":"getStrategy","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Gets the best strategy to handle iteration."},"parameters":[{"id":155,"name":"items","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"any"}}],"type":{"type":"reference","name":"RepeatStrategy"},"inheritedFrom":{"type":"reference","name":"RepeatStrategyLocator.getStrategy"}}],"sources":[{"fileName":"/Users/EisenbergEffect/Documents/GitHub/The Durandal Project/aurelia/ui-virtualization/node_modules/aurelia-templating-resources/dist/aurelia-templating-resources.d.ts","line":658,"character":13}],"inheritedFrom":{"type":"reference","name":"RepeatStrategyLocator.getStrategy"}}],"groups":[{"title":"Constructors","kind":512,"children":[144]},{"title":"Methods","kind":2048,"children":[146,153]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":119,"character":49}],"extendedTypes":[{"type":"reference","name":"RepeatStrategyLocator"}]},{"id":2,"name":"TemplateStrategy","kind":256,"kindString":"Interface","flags":{"isExported":true},"children":[{"id":17,"name":"createBottomBufferElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":18,"name":"createBottomBufferElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":19,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":38,"character":27}]},{"id":14,"name":"createTopBufferElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":15,"name":"createTopBufferElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":16,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":37,"character":24}]},{"id":25,"name":"getFirstElement","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":26,"name":"getFirstElement","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":27,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":40,"character":17}]},{"id":28,"name":"getLastView","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":29,"name":"getLastView","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":30,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":41,"character":13}]},{"id":3,"name":"getScrollContainer","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":4,"name":"getScrollContainer","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":5,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"reference","name":"Element"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":34,"character":20}]},{"id":31,"name":"getTopBufferDistance","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":32,"name":"getTopBufferDistance","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":33,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"number"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":42,"character":22}]},{"id":6,"name":"moveViewFirst","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":7,"name":"moveViewFirst","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":8,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}},{"id":9,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":35,"character":15}]},{"id":10,"name":"moveViewLast","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":11,"name":"moveViewLast","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":12,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}},{"id":13,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":36,"character":14}]},{"id":20,"name":"removeBufferElements","kind":2048,"kindString":"Method","flags":{"isExported":true},"signatures":[{"id":21,"name":"removeBufferElements","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":22,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":23,"name":"topBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":24,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":39,"character":22}]}],"groups":[{"title":"Methods","kind":2048,"children":[17,14,25,28,3,31,6,10,20]}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":33,"character":41}]},{"id":233,"name":"calcOuterHeight","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":234,"name":"calcOuterHeight","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":235,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"number"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":55,"character":39}]},{"id":254,"name":"getElementDistanceToBottomViewPort","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":255,"name":"getElementDistanceToBottomViewPort","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":256,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"number"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":65,"character":58}]},{"id":257,"name":"getElementDistanceToTopViewPort","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":258,"name":"getElementDistanceToTopViewPort","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":259,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}}],"type":{"type":"instrinct","name":"number"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":66,"character":55}]},{"id":250,"name":"getStyleValue","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":251,"name":"getStyleValue","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":252,"name":"element","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"Element"}},{"id":253,"name":"style","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"string"}}],"type":{"type":"instrinct","name":"any"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":64,"character":37}]},{"id":236,"name":"insertBeforeNode","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":237,"name":"insertBeforeNode","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":238,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}},{"id":239,"name":"bottomBuffer","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":56,"character":40}]},{"id":244,"name":"rebindAndMoveView","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":245,"name":"rebindAndMoveView","kind":4096,"kindString":"Call signature","flags":{},"parameters":[{"id":246,"name":"repeat","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"VirtualRepeat","id":156}},{"id":247,"name":"view","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"View"}},{"id":248,"name":"index","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"number"}},{"id":249,"name":"moveToBottom","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"instrinct","name":"boolean"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":63,"character":41}]},{"id":240,"name":"updateVirtualOverrideContexts","kind":64,"kindString":"Function","flags":{"isExported":true},"signatures":[{"id":241,"name":"updateVirtualOverrideContexts","kind":4096,"kindString":"Call signature","flags":{},"comment":{"shortText":"Update the override context."},"parameters":[{"id":242,"name":"repeat","kind":32768,"kindString":"Parameter","flags":{},"type":{"type":"reference","name":"VirtualRepeat","id":156}},{"id":243,"name":"startIndex","kind":32768,"kindString":"Parameter","flags":{},"comment":{"text":"index in collection where to start updating.\n"},"type":{"type":"instrinct","name":"number"}}],"type":{"type":"instrinct","name":"void"}}],"sources":[{"fileName":"aurelia-ui-virtualization.d.ts","line":62,"character":53}]}],"groups":[{"title":"Classes","kind":128,"children":[50,111,34,41,75,68,156,143]},{"title":"Interfaces","kind":256,"children":[2]},{"title":"Functions","kind":64,"children":[233,254,257,250,236,244,240]}]} \ No newline at end of file diff --git a/package.json b/package.json index 1e3c220..a9795d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "aurelia-ui-virtualization", - "version": "1.0.0-beta.3.0.2", + "version": "1.0.0-beta.3.1.0", "description": "A plugin that provides a virtualized repeater and other virtualization services.", "keywords": [ "aurelia", diff --git a/src/array-virtual-repeat-strategy.js b/src/array-virtual-repeat-strategy.js index 7dc4223..20ad113 100644 --- a/src/array-virtual-repeat-strategy.js +++ b/src/array-virtual-repeat-strategy.js @@ -15,8 +15,8 @@ export class ArrayVirtualRepeatStrategy extends ArrayRepeatStrategy { * @param repeat The repeater instance. * @param items The new array instance. */ - instanceChanged(repeat: VirtualRepeat, items: Array, first: number): void { - this._inPlaceProcessItems(repeat, items, first); + instanceChanged(repeat: VirtualRepeat, items: Array, ...rest): void { + this._inPlaceProcessItems(repeat, items, rest[0]); } _standardProcessInstanceChanged(repeat: VirtualRepeat, items: Array): void {