Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdd132c4

Browse files
committed
feat: export config with fill , size label
1 parent44fa01f commitdd132c4

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

‎lib/exportLabelData.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ const exportLabelData = (lb: LabelStoreType): ExportLabelDataType[] => {
88
constx=el.getAttribute("x")!
99
consty=el.getAttribute("y")!
1010
consttext=el.innerHTML
11+
const{ fill, fontSize}=el.style;
1112
finalData.push({
1213
text,
1314
x,
1415
y,
15-
hide:dt.hide
16+
hide:dt.hide,
17+
fill,
18+
fontSize:(parseInt(fontSize,10)/lb.scalingFactor).toString()
1619
})
1720
}
1821
})

‎lib/importLabelConfig.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ const importLabelConfig = (dt: ExportLabelDataType[]) : LabelStoreType => {
2020
}
2121
return{
2222
data,
23+
scalingFactor:1
2324
};
2425
};
2526

‎typings/map.store.d.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,6 @@ export interface ExportLabelDataType {
4141
x:string;
4242
y:string;
4343
hide:boolean;
44+
fontSize:string;
45+
fill:string;
4446
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp