mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: Don't overflow text beyond width of Excalidraw (#3215)
* fix: Don't overflow text beyond width of Excalidraw * update changelog
This commit is contained in:
parent
612e71e38b
commit
6e629383ea
2 changed files with 17 additions and 0 deletions
|
@ -80,6 +80,19 @@ export const textWysiwyg = ({
|
|||
color: updatedElement.strokeColor,
|
||||
opacity: updatedElement.opacity / 100,
|
||||
filter: "var(--appearance-filter)",
|
||||
maxWidth: `${
|
||||
appState.offsetLeft +
|
||||
appState.width -
|
||||
viewportX -
|
||||
// margin-right of parent if any
|
||||
Number(
|
||||
getComputedStyle(
|
||||
document.querySelector(".excalidraw")!.parentNode as Element,
|
||||
).marginRight.slice(0, -2),
|
||||
) -
|
||||
// padding of layer ui footer
|
||||
8
|
||||
}px`,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue