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

发现bug一枚,pause()方法有问题的 #436

Open
hellozhangran opened this issue Apr 12, 2018 · 0 comments
Open

发现bug一枚,pause()方法有问题的 #436

hellozhangran opened this issue Apr 12, 2018 · 0 comments

Comments

@hellozhangran
Copy link

hellozhangran commented Apr 12, 2018

如题 ~

pause只是清理了this._LSN.autoPlay上的当前计时器,如果执行pause的时候,代码已经进入了slideTo环节,其实清理_LSN.autoPlay已经没有用了。 slideTo执行到最后会自动创建新的计时器进入下一轮播放。

验证:
随便找个demo, 开启自动播放模式,因为duration默认是2000。就在初始化iSlider代码后面加上

setTimeout(()=>{
     islider.pause()
}, 2000)

你会发现是暂停不了的。 (如果不能复现的话,可以改个延迟执行时间,多试试很容易重现)

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