• Robert Knight and Sheetal Umesh Kumar's avatar
    Show adder if user makes a selection and then launches the plugin. · 487d782e
    If a user selects some text, and then realises that Hypothesis isn't
    active, their first reaction will probably be to activate Hypothesis.
    In this scenario, we should pop up the adder near the selection on launch.
    
     * If there is a selection when the 'ready' event fires, show the adder
       at the focus point of the selection.
    
     * For consistency, show the adder at the focus point of the selection
       after a selection whilst Hypothesis is active.
    
     * Add 'range-util' module which provides utility functions to get
       the coordinates at the end of the selection.
    
       'range-util' uses the DOM Range, Selection and NodeIterator APIs directly
       rather than Annotator's Range functions for several reasons:
    
       1) Given that H now requires IE >= 10, all of our target browsers
          have all the APIs that we need.
    
       2) Using the DOM APIs directly proved easier to debug and test.
    487d782e
Name
Last commit
Last update
..
anchoring Loading commit data...
plugin Loading commit data...
test Loading commit data...
config.js Loading commit data...
guest.coffee Loading commit data...
highlighter.coffee Loading commit data...
host.coffee Loading commit data...
main.js Loading commit data...
pdf-sidebar.coffee Loading commit data...
range-util.js Loading commit data...
sidebar.coffee Loading commit data...