fixes Issue 1204: border width is now added to viewpoint offset calculation
This commit is contained in:
parent
7e029d21cc
commit
94a8b19f11
@ -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