annotationPopupCreated doesn't trigger

45 views
Skip to first unread message

webap...@gmail.com

unread,
Aug 11, 2016, 1:03:39 PM8/11/16
to PDFTron WebViewer
Hello. I'm using 2.2 version and trying to customize note popup but events related to it(annotationPopupCreated, annotationPopupStateChanged) do not trigger. I'm using example listed in AnnotationEdit.js.
am.on('annotationPopupCreated', function(e, annotation, $popupel) {
var popupcomment = $popupel.find('.popup-comment');
popupcomment[0].style.backgroundColor = 'red';
popupcomment.bind("keyup", function(e) {
annotation.setCustom(e.target.value);
});
});
Other events(annotationChanged, annotationSelected etc.) work fine.

Matt Parizeau

unread,
Aug 12, 2016, 5:51:30 PM8/12/16
to PDFTron WebViewer
Hi,

The popup events are only triggered for the older version of notes inside WebViewer (they can be seen if you don't call disableDefaultStickyNotes inside NotesPanel.js).

Currently there aren't any events that you can access from a config file to customize the NotesPanel, so you'll need to modify NotesPanel.js directly if you want to make JavaScript changes. Depending on what you want to do you might also be able to add some CSS classes to change the styling of the notes.

Let me know if you have any further questions!

Matt Parizeau
Software Developer
PDFTron Systems Inc.
Reply all
Reply to author
Forward
0 new messages