refactor: fix using magic numbers

This commit is contained in:
2026-02-05 11:24:20 +05:00
parent f7d2353d8f
commit ca3995881f
2 changed files with 5 additions and 4 deletions
+3 -3
View File
@@ -65,10 +65,10 @@
function getTextPosition(textItem: TextItem) {
const panelWidth = PANEL_SETTINGS.PANEL_WIDTH;
const paddingX = textItem.paddingX ?? 20;
const verticalOffset = textItem.verticalOffset ?? 0;
const paddingX = textItem.paddingX;
const verticalOffset = textItem.verticalOffset;
const centerY = panel.height / 2 + verticalOffset;
const textWidth = 300;
const textWidth = panelWidth - paddingX * 2;
let position;
switch (textItem.textAlign) {