TypeError: _this.viewerBase.exportAnnotationsAsObject() is undefined

Hello!

I'm trying to call the exportAnnotationsAsObject method in the annotationAdd callback, but get an error in the promise: TypeError: _this.viewerBase.exportAnnotationsAsObject() is undefined. This happens only for the StickyNote annotation type.

If I wrap the export method in a setTimeout, it works just fine. My guess is that the event is fired too quick. Is there any way to solve this? Code snippet include



4 Replies

DM Dhivyabharathi Mohan Syncfusion Team January 5, 2022 02:05 PM UTC

Hi Jakub, 
 
We were able to reproduce the reported issue. And we suspect that the reported issue occurs due to the annotationAdd event is triggered before adding the annotation in the UI and in the annotation collection. We will check and provide further details on January 10, 2022.  
In the meantime, could you please confirm whether you are facing the same script error while exporting the sticky notes annotation as object using the annotationAdd event. So, that it will be helpful for us to investigate further and assist you better. 
 
Screenshot of the script error which we are facing on our end: 
 
 
Regards, 
Dhivya. 



DM Dhivyabharathi Mohan Syncfusion Team January 10, 2022 12:23 PM UTC

Hi Jakub,



We confirmed the reported issue “annotationAdd event is triggered before adding the sticky notes annotation” and the fix for the changes will be included in our upcoming weekly NuGet release on February 2, 2022. You can track the status using the below feedback link,



https://www.syncfusion.com/feedback/31758/the-annotationadd-event-is-triggered-before-adding-the-sticky-notes-annotation-in



Regards,

Dhivya.



DM Dhivyabharathi Mohan Syncfusion Team February 3, 2022 03:22 AM UTC

Hi Jakub, 
  
We had a service pack release on Monday (January 31, 2022) and so the current week's NuGet release is skipped. Your issue is already fixed and will be included in the next weekly release as planned on February 9, 2022. 
  
Regards, 
Dhivya. 



DM Dhivyabharathi Mohan Syncfusion Team February 9, 2022 02:27 PM UTC

Hi Jakub, 
  
We have fixed the reported issue and the fix was included in our latest weekly NuGet release v19.4.0.50. Kindly upgrade to that version to get the issue resolved. 
 
Packages:     


 
 
 
 
Regards, 
Dhivya. 


Loader.
Up arrow icon