refactor(network): Die Methode getAnnotationParams wurde aktualisiert, um die Anmerkung übersetzen und das Verhältnis ihrer Größe ändern zu können.
This commit is contained in:
@@ -22,11 +22,12 @@
|
||||
}
|
||||
|
||||
static async createSignature(element) {
|
||||
const annotParams = await getAnnotationParams(element.left, element.top);
|
||||
const id = PSPDFKit.generateInstantId()
|
||||
const width = Annotation.inchToPoint(element.width)
|
||||
const height = Annotation.inchToPoint(element.height)
|
||||
const top = Annotation.inchToPoint(element.top) - height / 2
|
||||
const left = Annotation.inchToPoint(element.left) - width / 2
|
||||
const width = annotParams.signature.width;
|
||||
const height = annotParams.signature.height;
|
||||
const top = annotParams.signature.top;
|
||||
const left = annotParams.signature.left;
|
||||
const page = element.page - 1
|
||||
|
||||
//signatures
|
||||
@@ -36,12 +37,7 @@
|
||||
formFieldName: id,
|
||||
backgroundColor: PSPDFKit.Color.YELLOW,
|
||||
blendMode: 'multiply',
|
||||
boundingBox: new PSPDFKit.Geometry.Rect({
|
||||
width,
|
||||
height,
|
||||
top,
|
||||
left,
|
||||
}),
|
||||
boundingBox: new PSPDFKit.Geometry.Rect(annotParams.signature),
|
||||
})
|
||||
|
||||
const formField = new PSPDFKit.FormFields.SignatureFormField({
|
||||
|
||||
Reference in New Issue
Block a user