fix text location
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user