mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: use canvas height when editing bound text
This commit is contained in:
parent
0e95e2b386
commit
60deddb0e2
2 changed files with 21 additions and 28 deletions
|
@ -226,7 +226,7 @@ export const handleBindTextResize = (
|
|||
}
|
||||
};
|
||||
|
||||
const computeBoundTextPosition = (
|
||||
export const computeBoundTextPosition = (
|
||||
container: ExcalidrawElement,
|
||||
boundTextElement: ExcalidrawTextElementWithContainer,
|
||||
) => {
|
||||
|
@ -236,6 +236,12 @@ const computeBoundTextPosition = (
|
|||
|
||||
let x;
|
||||
let y;
|
||||
if (isArrowElement(container)) {
|
||||
return LinearElementEditor.getBoundTextElementPosition(
|
||||
container,
|
||||
boundTextElement,
|
||||
);
|
||||
}
|
||||
if (boundTextElement.verticalAlign === VERTICAL_ALIGN.TOP) {
|
||||
y = containerCoords.y;
|
||||
} else if (boundTextElement.verticalAlign === VERTICAL_ALIGN.BOTTOM) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue