Annotation Delete being called when dragging annotation stamp from one page to another

Which product are you using?
PDF.js Express Plus

PDF.js Express Version

Detailed description of issue
After creating a stamp annotation from a drag and drop event. When dragging the stamp annotation to a new page, the annotation ‘delete’ event is called deleting the stamp.

Expected behaviour
Only the annotation ‘modify’ event to be called.

Thank you for posting the incident to our forum. We will provide you with an update as soon as possible.

Hello Dale,

I believe this is actually the expected behavior because when you drag an annotation to a new page, it creates a new one. This triggers the ‘add’ event as well. The old one will have to be removed which triggers the ‘delete’ event.

Best Regards,

Thanks Darian.

I was currently using an object as a proporty on the stamp, as I syncronize state between the annotationlist and array of provided annotations.

Is the best way to do this using get/set CustomData?

Hello Dale,

If your goal is to keep track of the annotations that move across pages, I think get/setCustomData should work fine.

Best Regards,

Perfect. This works.

Just had to update the annotations ID to the original id, which we store in the custom data