feat(annotation.js): Datum und Ort wurden vertauscht, um die Lesbarkeit zu verbessern.

This commit is contained in:
Developer 02 2025-03-17 15:47:38 +01:00
parent 0692922f12
commit da3c7bc0c2

View File

@ -53,6 +53,31 @@
* Date, post code and place text form part * Date, post code and place text form part
*/ */
const date_place_top_shift = 9.5; const date_place_top_shift = 9.5;
//city
const id_city = PSPDFKit.generateInstantId()
const annotation_city = new PSPDFKit.Annotations.WidgetAnnotation({
id: id_city,
pageIndex: page,
formFieldName: id_city,
backgroundColor: PSPDFKit.Color.DarkBlue,
blendMode: 'multiply',
boundingBox: new PSPDFKit.Geometry.Rect({
width: width * 1.2,
height: height / 2,
top: top + height + date_place_top_shift + 25,
left: left,
}),
fontSize: 8
})
const formFieldCity = new PSPDFKit.FormFields.TextFormField({
name: id_city,
annotationIds: PSPDFKit.Immutable.List([annotation_city.id]),
value: "",
readOnly: false
})
//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,7 +89,7 @@
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 + (height), top: top + 2 * height + date_place_top_shift + 23,
left: left left: left
}), }),
fontSize: 8, fontSize: 8,
@ -81,30 +106,6 @@
readOnly: true readOnly: true
}) })
//city
const id_city = PSPDFKit.generateInstantId()
const annotation_city = new PSPDFKit.Annotations.WidgetAnnotation({
id: id_city,
pageIndex: page,
formFieldName: id_city,
backgroundColor: PSPDFKit.Color.DarkBlue,
blendMode: 'multiply',
boundingBox: new PSPDFKit.Geometry.Rect({
width: width * 1.2,
height: height / 2,
top: top + height + 23 + date_place_top_shift + 2,
left: left,
}),
fontSize: 8
})
const formFieldCity = new PSPDFKit.FormFields.TextFormField({
name: id_city,
annotationIds: PSPDFKit.Immutable.List([annotation_city.id]),
value: "",
readOnly: false
})
this.markFieldAsRequired(formFieldCity); this.markFieldAsRequired(formFieldCity);
this.markFieldAsCity(formFieldCity); this.markFieldAsCity(formFieldCity);