This commit is contained in:
Nicolas Stepien 2012-05-14 17:58:38 +02:00
parent 97bfd4b55b
commit fc8295925c
2 changed files with 20 additions and 7 deletions

View File

@ -3807,11 +3807,20 @@
thumb = a.firstChild;
if (thumb.hidden) {
rect = a.getBoundingClientRect();
if (rect.top < 0) {
d.body.scrollTop += rect.top - 42;
}
if (rect.left < 0) {
d.body.scrollLeft += rect.left;
if ($.engine === 'webkit') {
if (rect.top < 0) {
d.body.scrollTop += rect.top - 42;
}
if (rect.left < 0) {
d.body.scrollLeft += rect.left;
}
} else {
if (rect.top < 0) {
d.documentElement.scrollTop += rect.top - 42;
}
if (rect.left < 0) {
d.documentElement.scrollLeft += rect.left;
}
}
return ImageExpand.contract(thumb);
} else {

View File

@ -2907,8 +2907,12 @@ ImageExpand =
thumb = a.firstChild
if thumb.hidden
rect = a.getBoundingClientRect()
d.body.scrollTop += rect.top - 42 if rect.top < 0
d.body.scrollLeft += rect.left if rect.left < 0
if $.engine is 'webkit'
d.body.scrollTop += rect.top - 42 if rect.top < 0
d.body.scrollLeft += rect.left if rect.left < 0
else
d.documentElement.scrollTop += rect.top - 42 if rect.top < 0
d.documentElement.scrollLeft += rect.left if rect.left < 0
ImageExpand.contract thumb
else
ImageExpand.expand thumb