diff --git a/wires.js b/wires.js index eac5040..b5f8bb1 100644 --- a/wires.js +++ b/wires.js @@ -335,15 +335,11 @@ function setChipStyle(props){ function localx(el, gx){ - var lx = gx+window.pageXOffset; - lx-=el.getBoundingClientRect().left - return lx; + return gx-el.getBoundingClientRect().left; } function localy(el, gy){ - var ly = gy+window.pageYOffset; - ly-=el.getBoundingClientRect().top - return ly; + return gy-el.getBoundingClientRect().top; } function setStatus(){