Replies: 1 comment
-
Scrolling is typically implemented by using a shifting |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently, troika-three doesn't support scrolling the text within a fixed area. If the lines calculated by the typesetting could be exposed, it should be possible to pass in a block of text, get back the array of lines that would be rendered. Instead of rendering all the lines, I could pass in just the lines that would fit in the area. Scrolling would involve just changing the index of the first line to be rendered.
Imagine I passed in the following text.
Based on the width, the typesetter might break it into the following lines of text
However, I want to limit the height of the text being rendered to only the first 3 lines. Now that I know how the typesetter will render the lines, I can just pass in the text for the first three lines.
To scroll, I would change the index of the first of the three lines
Does this sound reasonable? Can this capability be added?
Beta Was this translation helpful? Give feedback.
All reactions