1. 09 May, 2016 14 commits
  2. 04 May, 2016 9 commits
  3. 03 May, 2016 5 commits
  4. 01 May, 2016 1 commit
  5. 29 Apr, 2016 5 commits
    • Robert Knight's avatar
    • Robert Knight's avatar
      Set the adder to appear above or below the selection depending on the selection direction · 5d5a1e33
      Robert Knight authored
      Try to avoid showing the adder above the selected text where possible by
      showing the adder above or below the selection depending on whether the
      selection was made forwards, in which case the focus point is assumed to
      be at the bottom of the selection, or backwards, in which case the focus
      point is assumed to be at the top of the selection.
      5d5a1e33
    • Robert Knight's avatar
      Switch the direction of the adder arrow to point up if it would disappear off the top of the screen · 9aecc0c3
      Robert Knight authored
      If the last line of the selection is very close to the top of the screen
      then show the adder pointing up at the text rather than down at it.
      
      Also constrain the adder's position so that it never appears outside the
      viewport.
      9aecc0c3
    • Robert Knight's avatar
      Componentize the annotation adder toolbar · ceb8e238
      Robert Knight authored
      Extract the adder styles and logic into separate files for easier
      testing and extension.
      
      Also extract the styling for positioning the arrow out into a a helper
      class so we can more easily reposition the arrow depending on the
      available space.
      ceb8e238
    • 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
  6. 28 Apr, 2016 3 commits
  7. 27 Apr, 2016 2 commits
  8. 26 Apr, 2016 1 commit