Skip to content

onAnimationCompleteCallback is called too much times?  #21

@seriiserii825

Description

@seriiserii825

Hi.
I want to call easyScroll, whe youser scroll up, because at the top of the page i have an iframe, and inside i have a scroll too.

    window.onscroll = function (e) {
        const scrollUp = this.oldScroll > this.scrollY;
        if (scrollUp && window.pageYOffset < 800) {
            easyScroll({
                'scrollableDomEle': window,
                'direction': 'top',
                'duration': 400,
                'easingPreset': 'linear',
                'onAnimationCompleteCallback': function () {
                    console.log('completed')
                }
            });
        }
        this.oldScroll = this.scrollY;
    }

Bui i got "completed" 95 times.

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