introduce baseline in element making it backward compat

This commit is contained in:
Aakansha Doshi
2023-03-31 15:53:03 +05:30
parent 974745b9e5
commit f8b25375a4
8 changed files with 62 additions and 79 deletions
+2 -1
View File
@@ -42,7 +42,7 @@ export const actionUnbindText = register({
selectedElements.forEach((element) => {
const boundTextElement = getBoundTextElement(element);
if (boundTextElement) {
const { width, height } = measureText(
const { width, height, baseline } = measureText(
boundTextElement.originalText,
getFontString(boundTextElement),
boundTextElement.lineHeight,
@@ -56,6 +56,7 @@ export const actionUnbindText = register({
containerId: null,
width,
height,
baseline,
text: boundTextElement.originalText,
});
mutateElement(element, {