introduce DOM baseline in canvas rendering instead

This commit is contained in:
Aakansha Doshi
2023-03-31 11:50:04 +05:30
parent 9dab749dfd
commit 974745b9e5
2 changed files with 10 additions and 12 deletions

View File

@@ -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;