• Robert Knight's avatar
    Simplify Guest API for selecting annotations in the sidebar · 15ec6e28
    Robert Knight authored
    Previously there were three public methods for setting the selected annotations
    in the sidebar and opening it, but only one was used outside of `Guest`
    and there was an inconsistency when toggling vs selecting normally.
    
     - Combine the `showAnnotations`, `toggleAnnotationSelection` and
       `selectAnnotations` method into a single `selectAnnotations` method
       with a `toggle` parameter
    
     - Add tests for `selectAnnotations`
    
     - Fix an inconsistency where selecting an annotation without holding
       Ctrl to toggle the selection would open the sidebar, but selecting an
       annotation with Ctrl to toggle the selection did not
    15ec6e28
guest.js 18.8 KB