Can you please try with the latest revision of jScrollPane - I made some
tweaks this morning to fix a bug regarding padding (see
http://jscrollpane.kelvinluck.com/runeimp.html ).
You can find the latest version in the git repository or on my site or you
can download it directly from github:
http://github.com/vitch/jScrollPane/raw/master/script/jquery.jscrollpane.js
Another thing you could try is to manually set the width on the ul to 100%.
In fact, I think you have found a bug... If I look at my autoReinitialise
example I can see that the width is only set every second time the
scrollpane is initialised:
http://jscrollpane.kelvinluck.com/auto_reinitialise.html
I'll investigate further and get back to you...
Cheers,
Kelvin :)
Ignore the previous email. Found the problem and fixed it:
http://github.com/vitch/jScrollPane/commit/1083785087f1ed80a623ff45a0208b40471dd9c0
Please try again with the latest jScrollPane code from my site or github,
Thanks for the bug report,
Kelvin :)
On Wed, 18 Aug 2010 21:40:44 +0100, Kelvin Luck <kel...@kelvinluck.com>
wrote:
http://www.lifford.org/exp/jscrollpane-reinit/ (updated to use latest v2 beta 2)
Note how my original target div for jScrollPane has a set width of
400px, which is respected on load, but on reinit it gets set to auto,
so it expands to fill the space (I have a pretty narrow max-width set
on the body).
The re-init does not strip the width on jspPane, but it does get set
to the new too-wide width of the parent.
Also (and apologies in advance if you think this should've been a
separate thread) in the project I'm working on and presently updating
to jScrollPane 2, I have jScrollPanes controlling large areas of the
interface (working with the UI.Layout plugin) and sometimes have small
scrollable list boxes (like in my testcase) nested inside them.
Re-initializing the outer one can strip the scrollbars out of the
inner one, because of this (currently line 146 in the latest beta 2
unminified) line of code:
container.find('.jspVerticalBar,.jspHorizontalBar').remove().end();
Can you think of any reason not to make that...
container.find('> .jspVerticalBar, > .jspHorizontalBar').remove().end();
...so we only remove direct children scrollbars of the current container?
Thanks a ton for this plugin and the very hard work you put in
supporting it, Kelvin!
RL
> --
> You received this message because you are subscribed to the Google Groups
> "jscrollpane" group.
> To post to this group, send email to jscro...@googlegroups.com.
> To unsubscribe from this group, send email to
> jscrollpane...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/jscrollpane?hl=en.
>
>
Thanks for the detailed test case. I'll have to have a look into it
tomorrow morning (I'm in the UK and it's getting pretty late).
Re. the second part of your email, you are completely right. Not sure how
that slipped my mind (although I haven't done any tests yet with nested
scrollbars). Anyway - the fix is done:
http://github.com/vitch/jScrollPane/commit/05f5bed1bae868d1403ca556a1960afcc483b30c
Thanks again - I'll look into your other problem ASAP,
Kelvin :)
I've fixed the problem with regards to the width being reset. Turned out
to be a super simple fix:
http://github.com/vitch/jScrollPane/commit/274aaca214ad3c5f26b136ae1458a3b78e316ff9#diff-1
I'm surprised that all the other examples seem to work fine with that line
removed - I think I added it in while trying to get the dynamic width
example to work. But I just did a quick check across browsers and all
seemed to be OK.
I also put together an example page like yours for testing:
http://jscrollpane.kelvinluck.com/fixed_width.html
Thanks again for the bug report - let me know if you run into any other
difficulties,
Kelvin :)
Are you using the latest version of the script? Do you have a URL I could
take a look at?
Cheers,
Kelvin :)
On Thu, 19 Aug 2010 14:26:27 +0100, Muckinger <marcu...@googlemail.com>
wrote:
Thanks for another great test case! Looks like the width: auto was useful
for something after all (the padding calculation). Looks like I also broke
this example:
http://jscrollpane.kelvinluck.com/runeimp.html
I'll investigate further and issue a fix ASAP.
Do you mind if I include you test cases in the jScrollPane repository/
website? I'm thinking I'll make another folder called contrib or something
and keep the third party examples/ tests in there...
Cheers,
Kelvin :)
Awesome.
> Do you mind if I include you test cases in the jScrollPane repository/
> website? I'm thinking I'll make another folder called contrib or something
> and keep the third party examples/ tests in there...
Don't mind at all -- go right ahead!
RL
1) in this conditional:
if (!(isScrollableH || isScrollableV))
set the pane width to the container width:
pane.css({'top': 0, 'width': container.width() });
2) in the case of reinitialization, don't call pane.css('width',
null); until after the check to see that nothing has happened since
last initiliazation (so, I put it after the following code block):
if (!hasContainingSpaceChanged && pane.outerWidth() ==
contentWidth && pane.outerHeight() == contentHeight) {
// Nothing has changed since we last initialised
if (isScrollableH || isScrollableV) { // If we had already set a
width then re-set it
pane.css('width', previousPaneWidth + 'px');
}
// Then abort...
return;
}
This seems to be working on my current project; I just checked and it
seems to fix my testcase as well, but I then
rolled the changes out of my testcase so it continues to demonstrate the bug.
Hope that's helpful,
RL
Off the top of my head, the only thing I can see it causing problems with
is the dynamic width instances (e.g.
http://jscrollpane.kelvinluck.com/dynamic_width.html ). Hopefully it will
work though...
I'll have a fixed and tested version of jScrollPane up by Monday morning
GMT - hopefully all I'll need to do is use your fix!
Thanks again,
Kelvin :)
I think I've fixed the problem - you can see your test page here:
http://jscrollpane.kelvinluck.com/issues/7/
And links to the fixes on the issues list here:
http://github.com/vitch/jScrollPane/issues/issue/7
Please grab the latest code and let me know if it works correctly in situ
on your page,
Thanks,
Kelvin :)