mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-17 06:21:16 +02:00
introduce DOM baseline in canvas rendering instead
This commit is contained in:
@@ -272,17 +272,8 @@ export const textWysiwyg = ({
|
||||
} else {
|
||||
textElementWidth += 0.5;
|
||||
}
|
||||
const baseline = measureBaseline(
|
||||
updatedTextElement.text,
|
||||
getFontString(updatedTextElement),
|
||||
updatedTextElement.lineHeight,
|
||||
!!container,
|
||||
);
|
||||
|
||||
const offset =
|
||||
(updatedTextElement.height - baseline - 8) * appState.zoom.value;
|
||||
|
||||
const top = viewportY + offset;
|
||||
const top = viewportY;
|
||||
// Make sure text editor height doesn't go beyond viewport
|
||||
const editorMaxHeight =
|
||||
(appState.height - viewportY) / appState.zoom.value;
|
||||
|
Reference in New Issue
Block a user