From efddb360490d8dfc6af7ca4796ce0703b5ab2438 Mon Sep 17 00:00:00 2001 From: BigEd Date: Sun, 19 Sep 2010 18:27:48 +0000 Subject: [PATCH] remove page Offsets to fix probing in scrolled browser window --- wires.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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(){