Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions and Errors #4

Open
AlbertSadykovOfficial opened this issue Oct 13, 2022 · 0 comments
Open

Suggestions and Errors #4

AlbertSadykovOfficial opened this issue Oct 13, 2022 · 0 comments

Comments

@AlbertSadykovOfficial
Copy link

AlbertSadykovOfficial commented Oct 13, 2022

  1. There is some problem (onCurrentImageEnd). This method does not check the current index in the array of images and an error occurs: (going out of the array).:
onCurrentImageEnd(index) {
      if (this.key in this.stories[index].images){      
        this.stories[index].images[this.key].viewed = true;
        this.$emit('сurrentImageEnd', this.key);
        this.key++;
      } else {
        this.key = 0  
      }
    },
  1. ALSO I suggest emitting an object of the following type at (onCurrentImageEnd):
    this.$emit('сurrentImageEnd', { 'story': this.indexSelected, 'image': this.key });
  2. I suggest calling the method сurrentAllImagesEnd at the beginning of onAllStoriesEnd:
onAllStoriesEnd() {
      this.$emit('сurrentAllImagesEnd', this.indexSelected);
      this.difference = 0;
      this.indexSelected = 0;
      this.key = 0;
      this.$emit('allStoriesEnd');
 },

Thank you for Library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant