- var body = document.body,
- docEl = document.documentElement,
- //gecko makes scrollLeft more negative as you scroll in rtl, other browsers don't
- //ref: https://code.google.com/p/closure-library/source/browse/closure/goog/style/bidi.js
- x = L.DomUtil.documentIsLtr() ?
- (e.pageX ? e.pageX - body.scrollLeft - docEl.scrollLeft : e.clientX) :
- (L.Browser.gecko ? e.pageX - body.scrollLeft - docEl.scrollLeft :
- e.pageX ? e.pageX - body.scrollLeft + docEl.scrollLeft : e.clientX),
- y = e.pageY ? e.pageY - body.scrollTop - docEl.scrollTop: e.clientY,
- pos = new L.Point(x, y);
-