Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Fix #453: Prevent text from wrapping in editor elements #469

Merged
merged 2 commits into from
Jun 2, 2017

Conversation

bryphe
Copy link
Member

@bryphe bryphe commented Jun 1, 2017

Issue: In some cases, the spans for text content are sized just a bit too small, causing the text to wrap

Defect: It seems that in some cases, with fractional fonts, there are fractional errors in the calculation that cause the element to be sized just a bit too small. This does not reproduce for all fonts / environments.

Fix: Experimented with a few different ways to fix this:

  • Add a buffer to the element (using Math.ceil for the calculation). This didn't work in all cases
  • Add whitespace: nowrap to the elements to prevent wrapping

The latter fix seemed to work reliably, and there was not a performance regression based on my testing, so I went with that scoped fix.

@bryphe
Copy link
Member Author

bryphe commented Jun 2, 2017

Fix #453

@bryphe bryphe merged commit b5ea293 into master Jun 2, 2017
@bryphe bryphe deleted the extr0py/453/word-wrap branch August 24, 2017 14:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant