Open huangguangjie opened 7 years ago
插件存在一个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也要减掉。 } }, //...
大兄弟,这里获取scrollTop有兼容问题 https://github.com/leiroc/wipe/issues/9
插件存在一个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也要减掉。 } }, //...