3.9 KiB
Now let's fix the history scrolling: 1.) Make sure
Scrolling using the arrow keys or mousewheel works fine now, But I found the following bugs already: 1.) Autoplay does not disable on scrolling. 2.) Restoring the chapter beginning shows the chapter heading as a normal line of text and no longer produces the drop-cap. 3.) Loading a game that was saved while choices were present does not restore the choice dialog. 4.) The game now seems to always scroll to the center of the page to add/animate in new content. Please keep this position at the page bottom as it was, only adding as much space as needed for the new content (like before). 5.) Make sure autoscrolling or manual scrolling always stops at the nearest line boundary, so no cut of lines can be visible. 6.) Suggest a plan how to fix the scrollbar controls. They look correct now. But moving them with the mouse feels clunky and somethimes it triggers strange behavior. We need a solution where the bar can be moved freele up and down without doing anything yet. Once released the content between the current position and the target position including the necessary margins are loaded before the scrolling is animated and then the now unneccessary blocks unloaded.
That sounds still too complicated! Why invalidate the layout index? Assume the following: 1.) The #right_page div has a size relative to the window. There is ONE line height value, which is a divisor or the page height/the page height has a fixed number of lines: Line height = Page height/fixed number of lines. 2.) All content has an exact multiple of line height as height all margins and paddings included. 3.) Therefore any coordinates or pixel sizes of the virtual content pane can be derived mathematically from line coordinates. 4.) Scrolling means translating the content vertically (with ease in/eas out animation) to the closest position where the page edges aligns with line edges.