Small fix for reinitialisation in combination with strict horizontal scrolling of a growing pane #130

Open
wants to merge 2 commits into
from

Conversation

Projects
None yet
4 participants

As commented in the code on
1ec254c#commitcomment-959306

There is a small issue with the testcase for contentWidth == previousContentWidth and the action to return and thus never update the contentWidth any more: as such all following calls to reinitialise will have the same effect (no scrollbars added because the contentWidth never gets updated)

I think isolated the problem with the new test-case page, and like to believe I also have an elegant fix for it.
I hope you can consider adding it into trunk.

The fix just doesn't use contentWidth but a new probeWidth() function that actually checks down on the content-level if there is more (or less) required space.

Kind regards,

-marc=

adding testcase showing the problem with not probing the real content…
…-dimensions

including the fix to get around it.
Owner

vitch commented Feb 14, 2012

Thanks for the pull request :)

It looks good - I remember being a bit dubious about the code in 1ec254c when I accepted it.

Unfortunately I'm a bit snowed under at the moment so might not be able to integrate this too soon but I will try to ASAP.

Thanks again!

Hi Kelvin,

I know about the snow-under effect for sure, so no worries and thx for the
reply,
the interwebs will help us remember this all too well now :)

and most of all: thx for sharing jscrollpane, it comes with a
responsibility, so good for you for taking it up!

by the way: I'm using your brainchild to couple 3 of them in an excel-like
freeze-panes scrolling effect where the main scroll area couples its
horizontal scroll with the top column-headings and the vertical scroll with
the left row-headings (making sense?)

for now I'm setteling with showing all scroll-bars but the end result might
require me to hide the scroll-bars in the headings (top and left)

Anyway: I'm planning to share my stuff on github soon, but I was wondering
how much of the customization required for my solution you would be
interested to pull up into jscrollpane (I'm thinking about the handyness
of coupling the scrollpanes, and the possibility for visualy hiding them,
but functionally keeping them)

kind regards,
-marc=

2012/2/14 Kelvin Luck <
reply@reply.github.com

Thanks for the pull request :)

It looks good - I remember being a bit dubious about the code in
1ec254c when I accepted it.

Unfortunately I'm a bit snowed under at the moment so might not be able to
integrate this too soon but I will try to ASAP.

Thanks again!


Reply to this email directly or view it on GitHub:
#130 (comment)

just fyi I've recently published the project I mentioned at https://github.com/marc-portier/jquery-planboard

Owner

vitch commented Feb 27, 2012

Nice work - it looks good :) I still haven't had a chance to properly look at your change to pull it I'm afraid...

Note, this appears to be the same issue I'm running into with issue #148, just submitted.

marc-portier's change to fix the scrolling width resizing issue was i…
…ncomplete -- it didn't correctly catch subsequent changes in size. My change removes the previousContentWidth variable because the contentWidth variable contains the previous content width on a re-initialization. It is the right comparison to make against the new probed width.

verified and added troycobb's additional fix

mohoch1 commented Aug 27, 2012

Hi Guys.
I am stuck in exactly the problem marc described in the comments in his code changes.
My width and previousWidth are the same.
I was wondering - why cant we do the calculation of contentWidth just before checking if anything has changed? This will give us a correct indication if the current situation is different than the previous.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment