| Issue 11: | Some changes in code (transparent top / bottom now work, IE jumping-fix, real startup positioning) | |
| 2 people starred this issue and may be notified of changes. | Back to list |
Well, I made some changes in code. And I should post in this issues, so
here we go:
1. I added an inner div with an own css class and 3 lines of code to
generate its size. Now its possible to use transparent gifs / pngs (for
example rounded edges) for .jScrollPaneDragTop and .jScrollPaneDragBottom
without they will be overlapped by the background of .jScrollPaneDrag. Use
.jScrollPaneDragInner now to skin the pane ("position: relative" is
important, rest do as you want).
2. IE is jumping around by the scrollbar-offset, when you click a link or
make an onClick action and the scrollbar is visible. You can see it also in
pane4 of the basic examples when you add some content and try to click the
jScrollPane link. I just commented for IE line 412 out. It seems now to work.
3. I added a setting called startPosition which takes in effect, when you
disable maintainPosition. The reason is, that I wanted to go straight to a
position I have clicked a link in the scrollframe. I know, you can do it
by anchors, but then the whole browserframe will scroll to it there, too.
And that was not what I wanted. See
http://wagenbrett.lorenzmedia.de/de/products/ to understand what I mean.
Currently I get the startupPosition by top = -($("#elementToGo").position(
).top); $('.scroll-pane').jScrollPane({startPosition:top}); Perhaps you can
automatise it a little bit more.
I tested it in IE 7, IETester IE6 and Firefox 3. Well ok, not really
tested... I looked in there and it seems to work ;) But I don't know what
will happen, when you have more than one scrollbar on the page or use arrow
buttons. In IETester IE5 it didn't work, but IE5 is an a...... in every way. ;)
I marked (I hope) all my changes with "START CHANGES" and "END CHANGES" in
the js file.
|
|
,
Nov 09, 2008
And man I forgot something: there is a bug when you add content a remove it again. With the mousewheel you can still scroll around although there is nothing to scroll. I deactivated it in my example. |
|
,
Nov 10, 2008
(No comment was entered for this change.)
Status: Accepted
Owner: kelvin.luck |
|
,
Nov 10, 2008
Thanks for the detailed report and suggested changes. I will respond in full when I
get a little more time...
However, I have a suggestion for 3. It seems like startPosition isn't too necessary
and it isn't functionality which is found on a normal browser scrollbar. Instead of
adding a startPosition I would suggest that you just called scrollTo directly after
initialising jScrollPane. e.g. in your document ready handler:
$('selector').jScrollPane(settings);
$('selector')[0].scrollTo(position, true);
Or it looks in your example sourcecode like you are trying to go to the position of
an element within your scrollpane so instead you could do:
$('.scroll-pane').jScrollPane({});
$('.scroll-pane')[0].scrollTo('#elementToGo', true);
(the second parameter of true just prevents any animation from occurring so the
jScrollPane jumps directly to that position).
Would that work for you in this situation?
|
|
,
Nov 11, 2008
No, there is a bug with scrollTo(); Go to http://wagenbrett2.lorenzmedia.de/de/products/ Open Metal Wafer Carrier And then close it. The point "Interfaces" is now hidden. In http://wagenbrett.lorenzmedia.de/de/products/ it works with startPosition. I also activated now the Mousewheel in wagenbrett2 to show you the other bug. Just open any point that the scrollbar appears and close it that the scrollbar disappears. You can still use the Mousewheel and scroll. |
|
,
Dec 10, 2008
Can you please test against the just release 1.2.3 and let me know if you still see the bug with the mouse wheel and scrollTo? I will look into adding the CSS to allow greater styling of the drag for the next release... Thanks :) |
|
|
|