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

.resize()的width和left有误 #5

Open
amhoho opened this issue Dec 22, 2016 · 1 comment
Open

.resize()的width和left有误 #5

amhoho opened this issue Dec 22, 2016 · 1 comment

Comments

@amhoho
Copy link

amhoho commented Dec 22, 2016

多测次数,发现width不断叠加了,10000px有时叠到5W多,left的算法也不准.
我根据自己的将其改成了
this.total=this.lengththis.size;
css[this.direction?'top':'left']=-this.current
this.size+'px';
始终保持宽度和一直居中了

@qiqiboy
Copy link
Owner

qiqiboy commented Dec 22, 2016

修改后能正常工作就好。
计算不准确,我猜测可能是css这边定义又一些关系?总之,可以使用了就好。
感谢反馈

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

2 participants