Side navigation
#933 closed bug (fixed)
Opened February 08, 2007 09:06PM UTC
Closed February 09, 2007 09:40AM UTC
Last modified June 20, 2007 02:04AM UTC
interface plugin - scrollto - does not work for horizontal scrolling correctly
Reported by: | michael@bluewigwam.c | 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
Attachments (0)
Change History (1)
Changed February 09, 2007 09:40AM UTC by comment:1
resolution: | → fixed |
---|---|
status: | new → closed |
Adopted, thx