fix text location

This commit is contained in:
hamid zarghami
2026-05-06 15:06:55 +03:30
parent 8717afbced
commit ae7eae34d9
2 changed files with 12 additions and 1 deletions
@@ -15,6 +15,8 @@ type ViewerDataPage = {
fontSize?: number;
fontFamily?: string;
fontWeight?: string;
lineHeight?: number;
textAlign?: "left" | "center" | "right";
fill?: string;
stroke?: string;
strokeWidth?: number;
@@ -89,6 +91,8 @@ export function transformViewerDataToPages(data: ViewerData): PageData[] {
if (obj.fontWeight !== undefined) baseObject.fontWeight = obj.fontWeight;
if (obj.letterSpacing !== undefined)
baseObject.letterSpacing = obj.letterSpacing;
if (obj.lineHeight !== undefined) baseObject.lineHeight = obj.lineHeight;
if (obj.textAlign !== undefined) baseObject.textAlign = obj.textAlign;
// انواع خاص objectها
if (obj.type === "rectangle" && obj.shapeType) {