Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-2758

scrollToAnnotation: Annotation references, sorting and size

    XMLWordPrintable

Details

    • High
    • Scrolling, size and sorting of annotations has been fixed
    • -

    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:

      1. This breaks sorting after y coordinate.
      2. This way you can't scroll inTextReflow which has another markup in the splitView
      3. 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

      1. Scroll to TextReflow splitView (proposal: pageX,Y)
      2. Sort annotations in commentNav by y coordinate (proposal: pageX,Y)
      3. Same size of annotations (proposal: previous pageX,Y based absolute rendering)
      4. Exact scroll in HTML splitView

       

      Attachments

        Activity

          People

            christophlamparter Christoph Lamparter (Inactive)
            christophlamparter Christoph Lamparter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: