article movement in 1.7.1

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
johnnychicago
Bear Rating Trainee
Bear Rating Trainee
Posts: 36
Joined: 25 Jul 2011, 23:26

article movement in 1.7.1

Postby johnnychicago » 08 Mar 2013, 16:50

From the wiki:

In 1.7.1 article movement shortcuts are a bit different in combined mode.

n/p or up/down will scroll long posts before switching to the next one
Ctrl-up/down will move between posts like previous versions


Cool :)

I used to fiddle in the mappings to put N and P on the up/down keys, so this is convenient to me.

However I was playing around a bit with the new behaviour of up/down, and in real life use I think it's less than smooth. If you're looking at small articles, it jumps from one to the next. If you're looking at larger articles, it scrolls quite far on each key press, so I find it hard to keep in the flow of the text you're looking at. When there's a small article after a long one, it jumps down till the small one is on top of the screen. It seemed to me sufficiently random in scrolling down that I reverted back to mapping N/P. That one scrolls down predictably and a relatively small amount, so it feels smoother.

Just my 2 cents. Thanks for the update nevertheless :)

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: article movement in 1.7.1

Postby fox » 08 Mar 2013, 17:37

It scrolls for 1/2 of the buffer height. This is technically easily tweakable in videfeed.js function moveToPost().

E.g. scrollArticle(ctr.offsetHeight/2) try /3 if you think it jumps too far. I can change the default if there are more voices in support of it.

johnnychicago
Bear Rating Trainee
Bear Rating Trainee
Posts: 36
Joined: 25 Jul 2011, 23:26

Re: article movement in 1.7.1

Postby johnnychicago » 08 Mar 2013, 23:10

Don't bother for me, here, fox. The specific amount of scrolling is only one of my itches, the other one (different behaviour depending on article length) grates me more. But then, I have my solution. Just don't take N/P away from me, please ;)

parsifal
Bear Rating Trainee
Bear Rating Trainee
Posts: 4
Joined: 08 Jul 2013, 12:06

Re: article movement in 1.7.1

Postby parsifal » 08 Jul 2013, 17:57

Hi johnnychicago,

I've implemented a smooth-scrolling feature. If you're comfortable hacking with the source a bit, here are the mods:

In index.php, after line 96 (as of v1.8 ), add these lines:

Code: Select all

        <script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
        <script type="text/javascript">
                jQuery.noConflict();
        </script>


In js/viewfeed.js, change the function scrollArticle to look like this:

Code: Select all

function scrollArticle(offset) {
        try {
                if (!isCdmMode()) {
                        var ci = $("content-insert");
                        if (ci) {
                                jQuery(ci).animate({
                                        scrollTop: ci.scrollTop + offset + "px"
                                }, 100);
                        }
                } else {
                        var hi = $("headlines-frame");
                        if (hi) {
                                jQuery(hi).animate({
                                        scrollTop: hi.scrollTop + offset + "px"
                                }, 100);
                        }

                }
        } catch (e) {
                exception_error("scrollArticle", e);
        }
}


Enjoy!


Return to “Support”

Who is online

Users browsing this forum: No registered users and 8 guests