WebViewer Version:
“@pdftron/webviewer”: “^10.1.0”,
Do you have an issue with a specific file(s)?
No.
Can you reproduce using one of our samples or online demos?
No.
Are you using the WebViewer server?
No.
Does the issue only happen on certain browsers?
No.
Is your issue related to a front-end framework?
No.
Is your issue related to annotations?
Yes, FreeHand.
Please give a brief summary of your issue:
(Think of this as an email subject)
About FreeHand Annotation.
Please describe your issue and provide steps to reproduce it:
(The more descriptive your answer, the faster we are able to help you)
- case annotationChanged Event.
sample code.
WebViewer(...)
.then(instance => {
const { annotationManager } = instance.Core;
annotationManager.addEventListener('annotationChanged', (annotations, action) => {
console.log('-------------------onAnnotationChanged action=' + action);
});
1-1. Create freehand annotations.
1-2.
LOG : console.log(‘-------------------onAnnotationChanged action=’ + action);
It may take a few seconds for the console.log to appear.
AnnotationChangeEvent is slow.
FreeHand only.
- case API : getAnnotationsList().
sampleCode.
public buttonClick = () => {
const getAnnots =
this.viewerInstance.Core.annotationManager.getAnnotationsList();
if (getAnnots.length > 0) {
......
}
2-1. Click the button immediately after creating the annotation.
Cannot be get with getAnnotationsList API.
(length === 0)
These incidents are freehand annotations only.
[Background for this topic]
Fired when the user clicks the DB save button right after creating a freehand annotation.
Are there any countermeasures?
Please provide a link to a minimal sample where the issue is reproducible:
Best Regards.