File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
apps/OpenSign/src/components/pdf Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -98,7 +98,6 @@ function SignPad({
98
98
} else {
99
99
if ( isTab === "type" ) {
100
100
setIsSignImg ( "" ) ;
101
- onSaveSign ( null , false , textWidth , textHeight ) ;
102
101
onSaveSign (
103
102
null ,
104
103
false ,
@@ -216,11 +215,11 @@ function SignPad({
216
215
: fontSelect
217
216
? fontSelect
218
217
: "Fasthand" ;
219
-
218
+ const fontSizeValue = isInitial ? "60px" : "40px" ;
220
219
//creating span for getting text content width
221
220
const span = document . createElement ( "span" ) ;
222
221
span . textContent = textContent ;
223
- span . style . font = `40px ${ fontfamily } ` ; // here put your text size and font family
222
+ span . style . font = `${ fontSizeValue } ${ fontfamily } ` ; // here put your text size and font family
224
223
span . style . color = color ? color : penColor ;
225
224
span . style . display = "hidden" ;
226
225
document . body . appendChild ( span ) ; // Replace 'container' with the ID of the container element
@@ -230,7 +229,7 @@ function SignPad({
230
229
// Draw the text content on the canvas
231
230
const ctx = canvasElement . getContext ( "2d" ) ;
232
231
const pixelRatio = window . devicePixelRatio || 1 ;
233
- const addExtraWidth = isInitial ? 0 : 50 ;
232
+ const addExtraWidth = isInitial ? 20 : 50 ;
234
233
const width = span . offsetWidth + addExtraWidth ;
235
234
const height = span . offsetHeight ;
236
235
setTextWidth ( width ) ;
You can’t perform that action at this time.
0 commit comments