• 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
Name
Last commit
Last update
..
integration Loading commit data...
adder-test.js Loading commit data...
annotation-counts-test.js Loading commit data...
annotation-sync-test.js Loading commit data...
empty.html Loading commit data...
features-test.js Loading commit data...
guest-test.coffee Loading commit data...
host-test.coffee Loading commit data...
range-util-test.js Loading commit data...
selections-test.js Loading commit data...
sidebar-test.coffee Loading commit data...
sidebar-trigger-test.js Loading commit data...