mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: text never goes beyond max width for unbound text elements (#6288)
This commit is contained in:
parent
e1dc748aef
commit
38fc51b4e3
2 changed files with 43 additions and 6 deletions
|
@ -272,9 +272,9 @@ export const textWysiwyg = ({
|
|||
: updatedTextElement.height / lines.length;
|
||||
if (!container) {
|
||||
maxWidth = (appState.width - 8 - viewportX) / appState.zoom.value;
|
||||
}
|
||||
// As firefox, Safari needs little higher dimensions on DOM
|
||||
if (isFirefox || isSafari) {
|
||||
textElementWidth = Math.min(textElementWidth, maxWidth);
|
||||
} else if (isFirefox || isSafari) {
|
||||
// As firefox, Safari needs little higher dimensions on DOM
|
||||
textElementWidth += 0.5;
|
||||
}
|
||||
// Make sure text editor height doesn't go beyond viewport
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue