Details
-
Bug
-
Resolution: Fixed
-
None
-
High
-
Scrolling, size and sorting of annotations has been fixed
-
Empty show more show less
Description
Currently annotations have a xpath as reference to the document. The x and y properties of the annotation are relative to the xpath. This enables scrolling in splitView HTML docs but has several drawbacks:
- This breaks sorting after y coordinate.
- This way you can't scroll inTextReflow which has another markup in the splitView
- Rendering the annotations to this path element makes them inherit the possibly small size of these path elements.
I propose going back to or adding additionally pageX,pageY for annotations. pageY would be needed for sorting anyway. Only add xpath and path relative coordinates in case of HTML scrollers. Maybe we can also get xpath at runtime through a synthetic click event and its target and don't need it persisted at all.
xpath relative x,y may not be needed for scrolling if exact positioning is not required. Exact positioning is not working currently, anyways, because I don't know how to apply the correctly transformed xpath y-offset respecting zoom to scrollTop after el.scrollIntoView
Scroller overview
Scroller | splitView | multiFile | reference | reference splitView | scrolling splitView |
---|---|---|---|---|---|
pdf2html(Fallback, soon gone, source only in data/.../review.html) | no | no | #pageAnnotationX | - | - |
TextReflow | yes | no | #pageAnnotationX | pageX,Y | scrollToPage(page_idx, pos) |
HTML | yes | yes | #pageAnnotationX | xpath | el.scrollIntoView() |
Current scrolling
AnnotationDomController.scrollToAnnotation (Commit afbec25 in feature branch)
Open issues
- Scroll to TextReflow splitView (proposal: pageX,Y)
- Sort annotations in commentNav by y coordinate (proposal: pageX,Y)
- Same size of annotations (proposal: previous pageX,Y based absolute rendering)
- Exact scroll in HTML splitView