From 8361f513ed6fb212a309761360a28f88f35c9cdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Tue, 21 Jun 2011 00:37:26 +0100 Subject: [PATCH] Allow the optional overriding of target in DomEvent.getOffset(). --- src/browser/DomEvent.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/browser/DomEvent.js b/src/browser/DomEvent.js index 2bf7d2ea..f7056de7 100644 --- a/src/browser/DomEvent.js +++ b/src/browser/DomEvent.js @@ -58,10 +58,10 @@ var DomEvent = { return event.target || event.srcElement; }, - getOffset: function(event) { + getOffset: function(event, target) { // Remove target offsets from page coordinates return DomEvent.getPoint(event).subtract( - DomElement.getOffset(DomEvent.getElement(event), true)); + DomElement.getOffset(target || DomEvent.getElement(event), true)); }, preventDefault: function(event) {