fix line and peykan in viwer
This commit is contained in:
@@ -51,15 +51,15 @@ export function transformViewerDataToPages(data: ViewerData): PageData[] {
|
||||
visible: true,
|
||||
};
|
||||
|
||||
// برای line و arrow، width و height در viewer-data.json به عنوان اندازه هستند
|
||||
// اما در EditorObject به عنوان مختصات انتهایی استفاده میشوند
|
||||
// برای line و arrow، width و height در viewer-data.json به عنوان مختصات انتهایی هستند
|
||||
// در EditorObject هم به عنوان مختصات انتهایی ذخیره میشوند
|
||||
if (obj.type === 'line' || obj.type === 'arrow') {
|
||||
// width و height مستقیماً مختصات نقطه پایان هستند
|
||||
if (obj.width !== undefined) {
|
||||
baseObject.width = obj.x + obj.width;
|
||||
baseObject.width = obj.width;
|
||||
}
|
||||
if (obj.height !== undefined) {
|
||||
// برای line، height ممکن است ضخامت باشد، اما برای arrow طول عمودی است
|
||||
baseObject.height = obj.y + obj.height;
|
||||
baseObject.height = obj.height;
|
||||
}
|
||||
} else {
|
||||
if (obj.width !== undefined) baseObject.width = obj.width;
|
||||
|
||||
Reference in New Issue
Block a user