If you want to customize the notes in the panel you can listen to the noteCreated event which will give you access to the note DOM element. For example:
$(document).on('noteCreated', function(e, annotation, element) {
var userName = element.find('.noteAuthor').text();
console.log(userName);
});
function shouldShowArrow() {
var showArrow = false;
var panelElements = $('#notesPanel').find('.panelElement');
var viewportHeight = $('#DocumentViewer').height();
if (panelElements.length > 0) {
panelElements.each(function(index, ele) {
if (parseFloat(ele.style.top) > viewportHeight) {
showArrow = true;
return false;
}
});
}
return showArrow;
}