1. 17 Jul, 2017 1 commit
    • Robert Knight's avatar
      Add doc comments to `_notifyOfLayoutChange` · 0f2f8b09
      Robert Knight authored
      - Add a doc comment to the _notifyOfLayoutChange function to clarify the
        purpose of the optional param.
      - Add a comment inside the function to describe the high-level structure of the
        sidebar and how expanding/collapsing it is achieved.
      - Correct a typo with "frameVisbileWidth"
      0f2f8b09
  2. 14 Jul, 2017 9 commits
  3. 13 Jul, 2017 6 commits
  4. 12 Jul, 2017 2 commits
  5. 11 Jul, 2017 12 commits
  6. 10 Jul, 2017 2 commits
    • Sean Roberts's avatar
      Merge pull request #489 from hypothesis/destroy-frame-mutation · 85225124
      Sean Roberts authored
      Avoid mutating frames array in DESTROY_FRAME action.
      85225124
    • Robert Knight's avatar
      Fix adder position when document or body position is offset. · efbdc813
      Robert Knight authored
      Fix positioning of the adder when the document or body elements are
      positioned and offset relative to their default position.
      
      There were two problems:
      
       1. When converting from viewport to "document" coordinates, code in
          `adder.js` and `range-util.js` failed to account for the document
          element's position being offset from the default (0, 0) location.
       2. When setting the adder's top/left coords, `Adder#showAt`
          did not take into account the offset of the body element from the
          document.
      
      This commit fixes the issue by:
      
       1. Using viewport coordinates as far as possible in the range-util and
          Adder functions to reduce the need for converting coordinates.
      
       2. Calculating the position of the adder by comparing the target
          viewport coordinates for the adder and the viewport coordinates of
          the adder's nearest positioned ancestor.
      
      Fixes #487
      efbdc813
  7. 07 Jul, 2017 1 commit
  8. 06 Jul, 2017 6 commits
  9. 05 Jul, 2017 1 commit
    • Juan Corona's avatar
      Emit an event on the Guest element, ‘scrollToRange’ · 139e16fe
      Juan Corona authored
      This allows attached handlers to hook into the behaviour of bringing a highlight anchor into view.
      The event.detail property contains a native DOM range representing the anchor.
      The default scroll behaviour can be prevented with the event.preventDefault method.
      The event bubbles upward, meaning a handler could be attached at the guest root element  - right now the document’s body element - and any ancestor.
      body -> documentElement -> document -> window
      139e16fe