stephanrauh / ngx-extended-pdf-viewer

A full-blown PDF viewer for Angular 16, 17, and beyond
https://pdfviewer.net
Apache License 2.0
487 stars 184 forks source link

Manipulating a image annotation #2561

Closed ankur655 closed 2 months ago

ankur655 commented 2 months ago

I was trying to do two things to an image annotation that is programatically added : 1) adding an event handler on clicking the annotation:

document.querySelector('div.stampEditor')?.addEventListener('click', (evt) => {console.log("clicked annotation")});

2) removing the "Add Alt text" and "remove" icons from the image annotation: document.querySelector('div.editToolbar').style.display = "none";

However both these don't seem to work - I spent hours trying to debug this but couldn't get anywhere. Maybe I am missing something very simple - so would appreciate if somebody could point out what's wrong.

ankur655 commented 2 months ago

@stephanrauh0000 would appreciate it if you could help out. Thanks

ankur655 commented 2 months ago

not an issue