fix: remoove unnecessary code

This commit is contained in:
RaktimaNXG
2024-03-26 09:50:46 +05:30
parent 34c99edf1a
commit e78a3991f0
+3 -6
View File
@@ -1319,11 +1319,12 @@ export const multiSignEmbed = async (
let currentLine = "";
for (const word of textContent.split(" ")) {
//get text line width
const lineWidth = font.widthOfTextAtSize(
`${currentLine} ${word}`,
fontSize
);
//check text content line width is less or equal to container width
if (lineWidth <= width) {
currentLine += ` ${word}`;
} else {
@@ -1338,13 +1339,9 @@ export const multiSignEmbed = async (
// Function to break text into lines based on when user go next line on press enter button
const breakTextIntoLines = (textContent, width) => {
const lines = [];
let currentLine = "";
for (const word of textContent.split("\n")) {
const lineWidth = font.widthOfTextAtSize(
`${currentLine} ${word}`,
fontSize
);
const lineWidth = font.widthOfTextAtSize(`${word}`, fontSize);
//checking string length to container width
//if string length is less then container width it means user press enter button
if (lineWidth <= width) {