rename to getLineHeight and use the same line height for regular text elements

This commit is contained in:
Aakansha Doshi 2023-03-01 13:38:03 +05:30
parent 91f6e87317
commit 0e54994187
5 changed files with 21 additions and 30 deletions

View file

@ -259,7 +259,7 @@ import throttle from "lodash.throttle";
import { fileOpen, FileSystemHandle } from "../data/filesystem";
import {
bindTextToShapeAfterDuplication,
getApproxLineHeight,
getLineHeight,
getApproxMinLineHeight,
getApproxMinLineWidth,
getBoundTextElement,
@ -1734,7 +1734,7 @@ class App extends React.Component<AppProps, AppState> {
// add paragraph only if previous line was not empty, IOW don't add
// more than one empty line
if (prevLine) {
const defaultLineHeight = getApproxLineHeight(
const defaultLineHeight = getLineHeight(
getFontString({
fontSize: textElementProps.fontSize,
fontFamily: textElementProps.fontFamily,