Product:
Product Version:8.3.1
We want to add the stamp on my custom place holder when we click on that place holder. We have used RectanglePlaceholder and when user click on this then we open the stamp creation modal . On modal when we click on create button the does not add to the place holder but it instead stick with mouse pointer .
Below is the sample how we are opening the stampmodal:
annotations.forEach((annotation) => {
if (
annotation instanceof Annotations.WidgetAnnotation &&
annotation.getField().value === "STAMP" &&
annotation.innerElement !== null
) {
annotation.innerElement.addEventListener("click", (e) => {
e.preventDefault();
e.stopPropagation();
openElements(["customStampModal"]);
});
}
}
);