From d8c0b16d7ec5cffe17ad14e2197ce5aa91268e2c Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Tue, 15 Nov 2016 13:27:42 +0000 Subject: [PATCH 1/2] Make timeline-window _unpaginate public and remove _ --- lib/timeline-window.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/timeline-window.js b/lib/timeline-window.js index 1889631ae..68d50388b 100644 --- a/lib/timeline-window.js +++ b/lib/timeline-window.js @@ -234,7 +234,7 @@ TimelineWindow.prototype.paginate = function(direction, size, makeRequest, // remove some events from the other end, if necessary var excess = this._eventCount - this._windowLimit; if (excess > 0) { - this._unpaginate(excess, direction != EventTimeline.BACKWARDS); + this.unpaginate(excess, direction != EventTimeline.BACKWARDS); } return q(true); } @@ -292,10 +292,8 @@ TimelineWindow.prototype.paginate = function(direction, size, makeRequest, * @param {number} delta number of events to remove from the timeline * @param {boolean} startOfTimeline if events should be removed from the start * of the timeline. - * - * @private */ -TimelineWindow.prototype._unpaginate = function(delta, startOfTimeline) { +TimelineWindow.prototype.unpaginate = function(delta, startOfTimeline) { var tl = startOfTimeline ? this._start : this._end; // sanity-check the delta From c0d862c9f0741fd8aa8fa27330d410eacb8a7d52 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 16 Nov 2016 11:06:56 +0000 Subject: [PATCH 2/2] Correct jsdoc for unpaginate --- lib/timeline-window.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/timeline-window.js b/lib/timeline-window.js index 68d50388b..742634313 100644 --- a/lib/timeline-window.js +++ b/lib/timeline-window.js @@ -287,7 +287,7 @@ TimelineWindow.prototype.paginate = function(direction, size, makeRequest, /** - * Trim the window to the windowlimit + * Remove `delta` events from the start or end of the timeline. * * @param {number} delta number of events to remove from the timeline * @param {boolean} startOfTimeline if events should be removed from the start