src/common/js/winjs/js/ui.js
function addMarkers(fetchResult) {
                    var items = fetchResult.items,
                        offset = fetchResult.offset,
                        totalCount = fetchResult.totalCount,
                        absoluteIndex = fetchResult.absoluteIndex,
                        atStart = fetchResult.atStart,
                        atEnd = fetchResult.atEnd;

                    if (isNonNegativeNumber(absoluteIndex)) {
                        if (isNonNegativeNumber(totalCount)) {
                            var itemsLength = items.length;
                            if (absoluteIndex - offset + itemsLength === totalCount) {
                                atEnd = true;
                            }
                        }

                        if (offset === absoluteIndex) {
                            atStart = true;
                        }
                    }

                    if (atStart) {
                        items.unshift(startMarker);
                        fetchResult.offset++;
                    }

                    if (atEnd) {
                        items.push(endMarker);
                    }
                }
function addMarkers(fetchResult) {
                    var items = fetchResult.items,
                        offset = fetchResult.offset,
                        totalCount = fetchResult.totalCount,
                        absoluteIndex = fetchResult.absoluteIndex,
                        atStart = fetchResult.atStart,
                        atEnd = fetchResult.atEnd;

                    if (isNonNegativeNumber(absoluteIndex)) {
                        if (isNonNegativeNumber(totalCount)) {
                            var itemsLength = items.length;
                            if (absoluteIndex - offset + itemsLength === totalCount) {
                                atEnd = true;
                            }
                        }

                        if (offset === absoluteIndex) {
                            atStart = true;
                        }
                    }

                    if (atStart) {
                        items.unshift(startMarker);
                        fetchResult.offset++;
                    }

                    if (atEnd) {
                        items.push(endMarker);
                    }
                }
function addMarkers ( fetchResult ) { var items = fetchResult . items , offset = fetchResult . offset , totalCount = fetchResult . totalCount , absoluteIndex = fetchResult . absoluteIndex , atStart = fetchResult . atStart , atEnd = fetchResult . atEnd ; if ( isNonNegativeNumber ( absoluteIndex ) ) { if ( isNonNegativeNumber ( totalCount ) ) { var itemsLength = items . length ; if ( absoluteIndex - offset + itemsLength === totalCount ) { atEnd = true ; } } if ( offset === absoluteIndex ) { atStart = true ; } } if ( atStart ) { items . unshift ( startMarker ) ; fetchResult . offset ++ ; } if ( atEnd ) { items . push ( endMarker ) ; } }
Adds markers on behalf of the data adapter if their presence can be deduced
Adds markers on behalf of the data adapter if their presence can be deduced