Custom panel header: render(notes) returns an HTMLElement placed before the title bar; with overwriteDefaultHeader it replaces the title bar. notes are the (filtered) annotations in the list. Pass null to cancel.
instance.UI.NotesPanel.setCustomHeader({ overwriteDefaultHeader: false, render: (notes) => { const div = document.createElement('div'); div.textContent = `${notes.length} comment(s)`; return div; },}); Copy
instance.UI.NotesPanel.setCustomHeader({ overwriteDefaultHeader: false, render: (notes) => { const div = document.createElement('div'); div.textContent = `${notes.length} comment(s)`; return div; },});
Custom panel header: render(notes) returns an HTMLElement placed before the title bar; with overwriteDefaultHeader it replaces the title bar. notes are the (filtered) annotations in the list. Pass null to cancel.