@@ -2,7 +2,12 @@ import React, { useState, useEffect } from "react";
2
2
import BorderResize from "./BorderResize" ;
3
3
import PlaceholderBorder from "./PlaceholderBorder" ;
4
4
import { Rnd } from "react-rnd" ;
5
- import { defaultWidthHeight , isMobile } from "../../constant/Utils" ;
5
+ import {
6
+ defaultWidthHeight ,
7
+ isMobile ,
8
+ textInputWidget ,
9
+ textWidget
10
+ } from "../../constant/Utils" ;
6
11
import PlaceholderType from "./PlaceholderType" ;
7
12
import moment from "moment" ;
8
13
import "../../styles/opensigndrive.css" ;
@@ -202,7 +207,7 @@ function Placeholder(props) {
202
207
}
203
208
204
209
const widgetTypeExist = [
205
- "text" ,
210
+ textInputWidget ,
206
211
"checkbox" ,
207
212
"name" ,
208
213
"company" ,
@@ -238,7 +243,7 @@ function Placeholder(props) {
238
243
} else if (
239
244
props . isPlaceholder &&
240
245
! props . isDragging &&
241
- props . pos . type !== "label"
246
+ props . pos . type !== textWidget
242
247
) {
243
248
if ( props . pos . key === props . selectWidgetId ) {
244
249
props . handleLinkUser ( props . data . Id ) ;
@@ -277,18 +282,18 @@ function Placeholder(props) {
277
282
props ?. handleNameModal ( true ) ;
278
283
}
279
284
280
- if ( props . isPlaceholder && props . type !== "label" ) {
285
+ if ( props . isPlaceholder && props . type !== textWidget ) {
281
286
props . setUniqueId ( props . data . Id ) ;
282
287
}
283
288
props . setSignKey ( props . pos . key ) ;
284
289
props . setWidgetType ( props . pos . type ) ;
285
290
props . setCurrWidgetsDetails ( props . pos ) ;
286
291
} ;
287
292
const handleCopyPlaceholder = ( e ) => {
288
- if ( props . data && props ?. pos ?. type !== "label" ) {
293
+ if ( props . data && props ?. pos ?. type !== textWidget ) {
289
294
props . setSignerObjId ( props ?. data ?. signerObjId ) ;
290
295
props . setUniqueId ( props ?. data ?. Id ) ;
291
- } else if ( props . data && props . pos . type === "label" ) {
296
+ } else if ( props . data && props . pos . type === textWidget ) {
292
297
props . setTempSignerId ( props . uniqueId ) ;
293
298
props . setSignerObjId ( props ?. data ?. signerObjId ) ;
294
299
props . setUniqueId ( props ?. data ?. Id ) ;
@@ -324,7 +329,9 @@ function Placeholder(props) {
324
329
) : (
325
330
( ( ! props ?. pos ?. type && props . pos . isStamp ) ||
326
331
( props ?. pos ?. type &&
327
- ! [ "date" , "label" , "signature" ] . includes ( props . pos . type ) &&
332
+ ! [ "date" , textWidget , "signature" ] . includes (
333
+ props . pos . type
334
+ ) &&
328
335
! props . isSignYourself ) ) && (
329
336
< i
330
337
onClick = { ( e ) => {
@@ -349,7 +356,7 @@ function Placeholder(props) {
349
356
)
350
357
) }
351
358
352
- { props . pos . type !== "label" && ! props . isSignYourself && (
359
+ { props . pos . type !== textWidget && ! props . isSignYourself && (
353
360
< i
354
361
data-tut = "reactourLinkUser"
355
362
className = "fa-regular fa-user signUserIcon"
@@ -511,7 +518,7 @@ function Placeholder(props) {
511
518
//ref={nodeRef}
512
519
key = { props . pos . key }
513
520
lockAspectRatio = {
514
- props . pos . type !== "label" &&
521
+ props . pos . type !== textWidget &&
515
522
( props . pos . Width
516
523
? props . pos . Width / props . pos . Height
517
524
: defaultWidthHeight ( props . pos . type ) . width /
0 commit comments