On 23/09/2010 18:21, Owen wrote:
> ;) it was to deal with changes of size in the surroundings! i never
> just tested it without calling the remove and re-add with my own
> width, height calculations. i ended up adding the remove function
> back into your script which works fine. if i get a chance i'll see if
> the vanilla v2 tool handles my scenario and report back if it doesn't.
Cool. I'd definitely recommend using the vanilla jScrollPane 2. Here's
an example of it dealing with changes in the size of the container
(resize your browser window to see it in action):
http://jscrollpane.kelvinluck.com/dynamic_width.html
> thanks for responding.
>
> one separate thing i have noticed that is different from version 1 is
> that you sometimes get to see a glimpse of the browser's native
> scrollbar before it is replaced at reload time (especially for
> scrollpanes with large amounts of content - i.e. while it's filling up
> the pane the browser's native scroll bars are visible and then once
> the dom is complete it changes the scrollbars (obviously calling your
> jscrollpane code at that stage). i never noticed that with version 1
> - not sure what has changed.
Basically everything has changed. However, I wouldn't expect it to
influence this. There is a possibility that the initialisation
calculations are slightly slower (as they also deal with horizontal
scrolling now). One major change is that the contents of the scroll pane
is wrapped (rather than the element itself) - that could also have
contributed to this problem.
If you want to raise an issue on github with a link to a striped down
test case (see http://jscrollpane.kelvinluck.com/issues/7/ for a good
example - you just need to provide the "before") then I will look
further into it when I get a chance,
Thanks,
Kelvin :)