Sha256: 7efed3f9a10029e61c87bd3e386a89a61431838e58722d5efebbd8b8450cbaa9
Contents?: true
Size: 636 Bytes
Versions: 30
Compression:
Stored size: 636 Bytes
Contents
pageflow.AdjacentPages = pageflow.Object.extend({ initialize: function(pages, scrollNavigator) { this.pages = pages; this.scrollNavigator = scrollNavigator; }, of: function(page) { var result = []; var pages = this.pages(); var nextPage = this.scrollNavigator.getNextPage(page.element, pages); if (nextPage.length) { result.push(nextPage.page('instance')); } _(page.linkedPages()).each(function(permaId) { var linkedPage = pages.filter('#' + permaId); if (linkedPage.length) { result.push(linkedPage.page('instance')); } }, this); return result; } });
Version data entries
30 entries across 30 versions & 1 rubygems