]> git.wh0rd.org - tt-rss.git/commit
Make the floating title transition smoother
authorAnders Kaseorg <andersk@mit.edu>
Sat, 31 Jan 2015 02:58:44 +0000 (21:58 -0500)
committerAnders Kaseorg <andersk@mit.edu>
Sat, 31 Jan 2015 02:58:44 +0000 (21:58 -0500)
commit5c145bde7a14ed6fe0bdde773925e92c381c620a
tree621c2c33937206a6b7827a09d47e042f1597abba
parentd8895ec679fb3557ddf01d8be74a5eb82c7dac7a
Make the floating title transition smoother

Previously the floating title would not appear until the real title
scrolled entirely out of view, which was visually distracting.  Now it
appears at the point when its bottom lines up with the real title’s
bottom.  This isn’t perfect yet due to small differences between the
two titles’ layouts, but it’s much closer.

We now need to use visibility: visible|hidden instead of display:
block|none to show and hide the floating title, in order to be able to
retrieve its height while it’s hidden.  It’s important to use that
height because occasionally line wrapping differences make the
floating title shorter than the real title, and we don’t want the real
title to poke out from underneath.

Also fix scrollToRowId to offset by the 4 pixel top margin (like
cdmScrollToArticleId already does), so that it goes back to a point
when the floating title was hidden; and set the right margin on the
floating title so that it’s the same width as the real title and
doesn’t overlap the scroll bar.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
index.php
js/viewfeed.js