Conversation
64d7be0 to
9169f13
Compare
|
Rebased |
|
I'm not able to build this with Node 21: As for the original question, I get what you're saying about it working like the note annotation tool, but I think that's just because the element selector is an appropriate interaction model for this mode. The intention is still different: creating a note annotation vs. an image annotation. We don't handle those annotation types the same way — in the content view, sidebar, or notes — so I think we want to keep them distinct. (I also think most of the time people are just selecting single images from PDFs, so image annotations will generally look the same in all three modes.) |
I just undid a config change that made it in by mistake. Otherwise there's nothing in here that should affect the build, or EPUB.js at all. Try |
This isn't really the same tool as in the PDF view - it only allows you to select images, and only entire images. It acts a lot more like the EPUB/snapshot note tool than the PDF area tool. Pretty much the only difference is that the image tool can only target images and includes the targeted image in the annotations it creates. So should we just combine the two? We could make the note tool produce image annotations instead of note annotations when an image is targeted, and then we wouldn't need a separate image annotation tool with confusingly inconsistent behavior.
(I looked into supporting all DOM elements/multiple DOM elements instead of only single images, but that would add a huge amount of complexity for marginal gain. People are usually just going to want to pull out a single image at a time. Annotating text is already covered by other tools, and unlike in PDFs, unselectable text is rare - when it occurs, it's usually short segments like equations.)
Fixes zotero/zotero#4032