Merge pull request #1205 from mohlendo/master
Fixes Issue 1204: Adds the border width to the viewport offset calculation
This commit is contained in:
commit
236b8fbbf0
@ -35,6 +35,11 @@ L.DomUtil = {
|
||||
do {
|
||||
top += el.offsetTop || 0;
|
||||
left += el.offsetLeft || 0;
|
||||
|
||||
//add borders
|
||||
top += parseInt(L.DomUtil.getStyle(el, "borderTopWidth"), 10) || 0;
|
||||
left += parseInt(L.DomUtil.getStyle(el, "borderLeftWidth"), 10) || 0;
|
||||
|
||||
pos = L.DomUtil.getStyle(el, 'position');
|
||||
|
||||
if (el.offsetParent === docBody && pos === 'absolute') { break; }
|
||||
|
Loading…
Reference in New Issue
Block a user