Skip to content

Are cycle-update-view-before/after events safe to use in production code? #862

@pjetrucha

Description

@pjetrucha

Hi @malsup,
First of all I don't know if the project is still being maintained so I don't know if this is a significant question at all :)

My use case is that I want to get the index of the next slide after every slide change.
I tried the cycle-after event, but the state is not refreshed yet:

el.on('cycle-after', (e, api) => {
   api.nextSlide; // it actually returns the index of the current slide to which the transition was made
});

There is a documented cycle-update-view event, but it fires twice with each change, so still not ideal.

While browsing the code, I found the following events:
cycle-update-view-before and cycle-update-view-after which would be perfect for my use case, but I don't see them in the documentation.

Can you confirm that I can use them safely in production for my purposes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions