-
csillag authored
* Updated Annotator to de4c0dfc (maintenance branch), which has typed anchors support merged. See https://github.com/hypothesis/annotator/pull/18 for explanation. The H specific parts: * Following Annotator API and packaging changes * The heatmap got a lot trickier. Since it can no longer make any assumption about the actual implementation of the highlights and anchors, now it does not rely on any data inside them. That includes the start and stop character offsets, too, which was previously used to find the nearest anchor for the up/down arrows on. We can't assume that all anchors have that data. Unfortunately, the Y coordinate is not always available, because the required part of the DOM might not be rendered yet. So the only data we have is the page number. (All anchors have page numbers). In the first phase, we only collect the anchors from the nearest page. Then we go there, to assure that it's rendered. When all the anchors have been realized, we select the nearest one, and actually scroll to it. This way, we can make it work with all kinds of anchors/highlights.
bcadbfd8