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

没有考虑滚动条件非顶部的情况 #7

Open
huangguangjie opened this issue May 3, 2017 · 1 comment
Open

没有考虑滚动条件非顶部的情况 #7

huangguangjie opened this issue May 3, 2017 · 1 comment

Comments

@huangguangjie
Copy link
Contributor

huangguangjie commented May 3, 2017

插件存在一个bug,就是当滚动条非罢于顶部的时候,发现涂沫的时候,涂沫位置并非于当前位置。我的修改意见是这样:
// ...
winTcanvasXY: function (canvas, x, y) {
var cC = canvas.getBoundingClientRect();
return {
x: x - cC.left,
y: y - cC.top - document.body.scrollTop //注意这里,把document.body.scrollTop也要减掉。
}
},
//...

@Marszed
Copy link

Marszed commented Oct 16, 2017

大兄弟,这里获取scrollTop有兼容问题
#9

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