Bug Tracker

Opened 14 years ago

Closed 14 years ago

Last modified 13 years ago

#933 closed bug (fixed)

interface plugin - scrollto - does not work for horizontal scrolling correctly

Reported by: michael@… Owned by: stefan
Priority: major Milestone:
Component: interface Version:
Keywords: scrollto Cc:
Blocked by: Blocking:

Description

ifxscrollto.js has a typo type bug in it. Patch is... =================================================================== --- ifxscrollto.js (revision 1295) +++ ifxscrollto.js (working copy) @@ -96,7 +96,7 @@

}

if (!z.axis
z.axis == 'horizontal') {
if (!jQuery.easing
!jQuery.easing[z.easing]) {
  • sl = ((-Math.cos(p*Math.PI)/2) + 0.5) * (z.endTop-z.startTop) + z.startTop;

+ sl = ((-Math.cos(p*Math.PI)/2) + 0.5) * (z.endLeft-z.startLeft) + z.startLeft;

} else {

sl = jQuery.easing[z.easing](p, n, z.startLeft, (z.endLeft - z.startLeft), z.o.duration);

}

=================================================================== The horizontal scroller does not work if you use only horizontal scrolling and you do not use an easing function becuase the properties entered are the Top properties not the Left properties.

I have noticed a second bug, which I'm not 100% sure of the cause of, but I believe is caused in iutil.js If you have horizontal scrolling and the page is at the top (document.documentElement.scrollTop is 0 in firefox), then the code in getScroll appears to incorrectly return 0 as the scrollLeft and ScrollTop. This patch appears to fix it, but I haven't tested this as thoroughly. =================================================================== --- iutil.js (revision 1295) +++ iutil.js (working copy) @@ -111,7 +111,7 @@

iw = 0; ih = 0;

} else {

  • if (document.documentElement && document.documentElement.scrollTop) {

+ if (document.documentElement != null && document.documentElement.scrollTop != null) {

t = document.documentElement.scrollTop; l = document.documentElement.scrollLeft; w = document.documentElement.scrollWidth;

===================================================================

Cheers

Michael Brunton-Spall Bluewigwam Design www.bluewigwam.com

Change History (1)

comment:1 Changed 14 years ago by stefan

Resolution: fixed
Status: newclosed

Adopted, thx

Note: See TracTickets for help on using tickets.