feat: Unterschriftsdatum unter das Unterschriftsfeld verschoben
This commit is contained in:
parent
9ffeb7afe8
commit
8cd8df4b02
@ -52,7 +52,7 @@
|
|||||||
/**
|
/**
|
||||||
* Date, post code and place text form part
|
* Date, post code and place text form part
|
||||||
*/
|
*/
|
||||||
const date_place_top_shift = 16
|
const date_place_top_shift = 14;
|
||||||
//date
|
//date
|
||||||
const id_date = PSPDFKit.generateInstantId()
|
const id_date = PSPDFKit.generateInstantId()
|
||||||
const annotation_date = new PSPDFKit.Annotations.WidgetAnnotation({
|
const annotation_date = new PSPDFKit.Annotations.WidgetAnnotation({
|
||||||
@ -64,8 +64,8 @@
|
|||||||
boundingBox: new PSPDFKit.Geometry.Rect({
|
boundingBox: new PSPDFKit.Geometry.Rect({
|
||||||
width: width * 1.55,
|
width: width * 1.55,
|
||||||
height: height / 2,
|
height: height / 2,
|
||||||
top: top + height + 25 + date_place_top_shift,
|
top: top + height + 25 + date_place_top_shift + (height) + 4,
|
||||||
left: left + width * 1.30,
|
left: left
|
||||||
}),
|
}),
|
||||||
fontSize: 8,
|
fontSize: 8,
|
||||||
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
||||||
@ -80,7 +80,7 @@
|
|||||||
value: detailedCurrentDate(),
|
value: detailedCurrentDate(),
|
||||||
readOnly: true
|
readOnly: true
|
||||||
})
|
})
|
||||||
|
|
||||||
//city
|
//city
|
||||||
var location = await getLocation();
|
var location = await getLocation();
|
||||||
const id_city = PSPDFKit.generateInstantId()
|
const id_city = PSPDFKit.generateInstantId()
|
||||||
@ -93,12 +93,12 @@
|
|||||||
boundingBox: new PSPDFKit.Geometry.Rect({
|
boundingBox: new PSPDFKit.Geometry.Rect({
|
||||||
width: width * 1.2,
|
width: width * 1.2,
|
||||||
height: height / 2,
|
height: height / 2,
|
||||||
top: top + height + 25 + date_place_top_shift,
|
top: top + height + 23 + date_place_top_shift,
|
||||||
left: left,
|
left: left,
|
||||||
}),
|
}),
|
||||||
fontSize: 8
|
fontSize: 8
|
||||||
})
|
})
|
||||||
|
|
||||||
const formFieldCity = new PSPDFKit.FormFields.TextFormField({
|
const formFieldCity = new PSPDFKit.FormFields.TextFormField({
|
||||||
name: id_city,
|
name: id_city,
|
||||||
annotationIds: PSPDFKit.Immutable.List([annotation_city.id]),
|
annotationIds: PSPDFKit.Immutable.List([annotation_city.id]),
|
||||||
@ -125,8 +125,8 @@
|
|||||||
boundingBox: new PSPDFKit.Geometry.Rect({
|
boundingBox: new PSPDFKit.Geometry.Rect({
|
||||||
width: width * 0.75,
|
width: width * 0.75,
|
||||||
height: height / 2,
|
height: height / 2,
|
||||||
top: top + height + 25 + label_top_shift + date_place_top_shift,
|
top: top + height + 23 + label_top_shift + date_place_top_shift + (height) + 4,
|
||||||
left: left + width * 1.30
|
left: left
|
||||||
}),
|
}),
|
||||||
fontSize: 8,
|
fontSize: 8,
|
||||||
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
backgroundColor: PSPDFKit.Color.TRANSPARENT,
|
||||||
@ -166,7 +166,7 @@
|
|||||||
annotationIds: PSPDFKit.Immutable.List([annotation_city_label.id]),
|
annotationIds: PSPDFKit.Immutable.List([annotation_city_label.id]),
|
||||||
value: "Ort",
|
value: "Ort",
|
||||||
readOnly: true
|
readOnly: true
|
||||||
})
|
})
|
||||||
|
|
||||||
return [annotation, formField, annotation_date, formFieldDate, annotation_city, formFieldCity, annotation_date_label, formFieldDateLabel, annotation_city_label, formFieldCityLabel]
|
return [annotation, formField, annotation_date, formFieldDate, annotation_city, formFieldCity, annotation_date_label, formFieldDateLabel, annotation_city_label, formFieldCityLabel]
|
||||||
}
|
}
|
||||||
@ -311,7 +311,7 @@
|
|||||||
|
|
||||||
//required
|
//required
|
||||||
static #requiredFieldNames = new Array()
|
static #requiredFieldNames = new Array()
|
||||||
|
|
||||||
static markFieldAsRequired(formField) {
|
static markFieldAsRequired(formField) {
|
||||||
this.#requiredFieldNames.push(formField.name)
|
this.#requiredFieldNames.push(formField.name)
|
||||||
}
|
}
|
||||||
@ -327,7 +327,7 @@
|
|||||||
this.#cityFieldNames.push(formField.name)
|
this.#cityFieldNames.push(formField.name)
|
||||||
}
|
}
|
||||||
|
|
||||||
static isCityField(formField){
|
static isCityField(formField) {
|
||||||
return this.#cityFieldNames.includes(formField.name)
|
return this.#cityFieldNames.includes(formField.name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user