Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Enriqe committed Feb 13, 2020
1 parent a14321f commit bc3b6c3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/amp-story-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ export class AmpStoryPlayer {
/**
* Navigates to the next story in the player.
* @private
* @visibleForTesting
*/
next_() {
if (this.currentIdx_ + 1 >= this.stories_.length) {
Expand All @@ -266,6 +267,7 @@ export class AmpStoryPlayer {
/**
* Navigates to the previous story in the player.
* @private
* @visibleForTesting
*/
previous_() {
if (this.currentIdx_ - 1 < 0) {
Expand All @@ -282,7 +284,7 @@ export class AmpStoryPlayer {

const nextStoryIdx = this.currentIdx_ - 1;
if (nextStoryIdx >= 0 && this.stories_[nextStoryIdx][IFRAME_IDX] === null) {
this.swapIframes_(nextStoryIdx, true /** backwards */);
this.swapIframes_(nextStoryIdx, true /** reverse */);
}
}

Expand All @@ -291,11 +293,11 @@ export class AmpStoryPlayer {
* the iframe from the story furthest away; depending where the user is
* navigating and allocates it to a story that the user is close to seeing.
* @param {number} nextStoryIdx
* @param {boolean} backwards
* @param {boolean} reverse
* @private
*/
swapIframes_(nextStoryIdx, backwards = false) {
const detachedStoryIdx = backwards
swapIframes_(nextStoryIdx, reverse = false) {
const detachedStoryIdx = reverse
? this.iframePool_.rotateRight(nextStoryIdx)
: this.iframePool_.rotateLeft(nextStoryIdx);

Expand Down

0 comments on commit bc3b6c3

Please sign in to comment.