Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly align annotation content in horizontal/spead scrolling modes #12848

Merged
merged 1 commit into from
Jan 10, 2021

Conversation

timvandermeij
Copy link
Contributor

@timvandermeij timvandermeij commented Jan 10, 2021

Not only was long text in popups no longer wrapped correctly, the alignment was also center instead of left (or right, depending on the locale used) for both text in popups and the other parts within the annotation's section, such as the icon.

In order to test this, I made annotation-popup-long.pdf that, when opened with the current viewer, will show the issue when the horizontal/spread scrolling modes are used and when opened with the new viewer will no longer have this issue. I have checked the other files in the test suite as well to make sure that this works for all of them.

Fixes #12847.

@timvandermeij
Copy link
Contributor Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/0cba2ba57984855/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/0cba2ba57984855/output.txt

Total script time: 4.02 mins

Published

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thank you!

Also, note that this fixes the same problem when the spread-modes are used, in addition to horizontal scrolling.

Not only was long text in popups no longer wrapped correctly, the
alignment was also center instead of left (or right, depending on the
locale used) for both text in popups and the other parts within the
annotation's section, such as the icon.
@timvandermeij timvandermeij changed the title Correctly align annotation content in horizontal scrolling mode Correctly align annotation content in horizontal/spead scrolling modes Jan 10, 2021
@timvandermeij
Copy link
Contributor Author

I have amended the commit message and PR title/text to also instead the spread modes.

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

Successfully merging this pull request may close these issues.

Annotation text does not wrap and overflows popup
3 participants