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

Transcription and translation alignment fails at non-100% zoom levels #1680

Open
blms opened this issue Nov 21, 2024 · 0 comments
Open

Transcription and translation alignment fails at non-100% zoom levels #1680

blms opened this issue Nov 21, 2024 · 0 comments
Labels
🐛 bug Something isn't working

Comments

@blms
Copy link
Contributor

blms commented Nov 21, 2024

When a document detail page with both a transcription and translation is first loaded, if the browser's zoom is not 100%, this will happen:

image

We've encountered this in the past, and the solution was just to set your browser to 100%, but it makes sense to have this open as a bug since it should not behave this way.

The solution probably lies somewhere in this calculation:

getLineCount(el) {
// determine the number of lines by dividing element's rendered height
// by its computed line height from CSS, and applying a floor function
return Math.floor(
el.getBoundingClientRect().height /
parseInt(getComputedStyle(el).getPropertyValue("line-height"))
);
}

@blms blms added the 🐛 bug Something isn't working label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant