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

Commitf079399

Browse files
committed
feat: font-size control for label works
1 parent94ff8b7 commitf079399

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

‎components/Label/LabelContainer.tsx‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ const LabelContainer: React.FC = () => {
5151
textNode.innerHTML=v;
5252
}
5353
};
54+
constchangeFontSizeLabel=(i:number,v:string)=>{
55+
consttextNode=document.getElementById(`label-text-${i+1}`);
56+
if(textNode){
57+
textNode.style.fontSize=(+v*label.scalingFactor).toString();
58+
}
59+
};
5460
return(
5561
<divclassName="ctx">
5662
<InputLabeltext="Label Controls"/>
@@ -82,7 +88,13 @@ const LabelContainer: React.FC = () => {
8288
/>
8389
</td>
8490
<td>
85-
<Inputtype="number"width="40px"size="mini"/>
91+
<Input
92+
type="number"
93+
initialValue="16"
94+
onChange={(e)=>changeFontSizeLabel(i,e.target.value)}
95+
width="40px"
96+
size="mini"
97+
/>
8698
</td>
8799
<td>
88100
<div

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp