src/common/js/winjs/js/ui.js
function (range, itemsCount) {
                    range._lastKnownSizeOfData = itemsCount; // store this in order to make unions.
                    if (!this._range) {
                        this._range = range;
                    } else {
                        // Take the union of these two ranges.
                        this._range.start = Math.min(this._range.start, range.start);
                        // To accurately calculate the new unioned range 'end' value, we need to convert the current and new range end
                        // positions into values that represent the remaining number of un-modified items in between the end of the range
                        // and the end of the list of data.
                        var previousUnmodifiedItemsFromEnd = (this._range._lastKnownSizeOfData - this._range.end);
                        var newUnmodifiedItemsFromEnd = (range._lastKnownSizeOfData - range.end);
                        var finalUnmodifiedItemsFromEnd = Math.min(previousUnmodifiedItemsFromEnd, newUnmodifiedItemsFromEnd);
                        this._range._lastKnownSizeOfData = range._lastKnownSizeOfData;
                        // Convert representation of the unioned end position back into a value which matches the above definition of _affecteRange.end
                        this._range.end = this._range._lastKnownSizeOfData - finalUnmodifiedItemsFromEnd;
                    }
                }
function (range, itemsCount) {
                    range._lastKnownSizeOfData = itemsCount; // store this in order to make unions.
                    if (!this._range) {
                        this._range = range;
                    } else {
                        // Take the union of these two ranges.
                        this._range.start = Math.min(this._range.start, range.start);
                        // To accurately calculate the new unioned range 'end' value, we need to convert the current and new range end
                        // positions into values that represent the remaining number of un-modified items in between the end of the range
                        // and the end of the list of data.
                        var previousUnmodifiedItemsFromEnd = (this._range._lastKnownSizeOfData - this._range.end);
                        var newUnmodifiedItemsFromEnd = (range._lastKnownSizeOfData - range.end);
                        var finalUnmodifiedItemsFromEnd = Math.min(previousUnmodifiedItemsFromEnd, newUnmodifiedItemsFromEnd);
                        this._range._lastKnownSizeOfData = range._lastKnownSizeOfData;
                        // Convert representation of the unioned end position back into a value which matches the above definition of _affecteRange.end
                        this._range.end = this._range._lastKnownSizeOfData - finalUnmodifiedItemsFromEnd;
                    }
                }
function ( range , itemsCount ) { range . _lastKnownSizeOfData = itemsCount ; // store this in order to make unions. if ( ! this . _range ) { this . _range = range ; } else { // Take the union of these two ranges. this . _range . start = Math . min ( this . _range . start , range . start ) ; // To accurately calculate the new unioned range 'end' value, we need to convert the current and new range end // positions into values that represent the remaining number of un-modified items in between the end of the range // and the end of the list of data. var previousUnmodifiedItemsFromEnd = ( this . _range . _lastKnownSizeOfData - this . _range . end ) ; var newUnmodifiedItemsFromEnd = ( range . _lastKnownSizeOfData - range . end ) ; var finalUnmodifiedItemsFromEnd = Math . min ( previousUnmodifiedItemsFromEnd , newUnmodifiedItemsFromEnd ) ; this . _range . _lastKnownSizeOfData = range . _lastKnownSizeOfData ; // Convert representation of the unioned end position back into a value which matches the above definition of _affecteRange.end this . _range . end = this . _range . _lastKnownSizeOfData - finalUnmodifiedItemsFromEnd ; } }
Marks the union of the current affected range and range as requiring layout
Marks the union of the current affected range and range as requiring layout