remove page Offsets to fix probing in scrolled browser window
This commit is contained in:
parent
ef88fdeb90
commit
efddb36049
8
wires.js
8
wires.js
|
@ -335,15 +335,11 @@ function setChipStyle(props){
|
||||||
|
|
||||||
|
|
||||||
function localx(el, gx){
|
function localx(el, gx){
|
||||||
var lx = gx+window.pageXOffset;
|
return gx-el.getBoundingClientRect().left;
|
||||||
lx-=el.getBoundingClientRect().left
|
|
||||||
return lx;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function localy(el, gy){
|
function localy(el, gy){
|
||||||
var ly = gy+window.pageYOffset;
|
return gy-el.getBoundingClientRect().top;
|
||||||
ly-=el.getBoundingClientRect().top
|
|
||||||
return ly;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setStatus(){
|
function setStatus(){
|
||||||
|
|
Loading…
Reference in New Issue