• Randall Leeds's avatar
    Refactor anchoring interface and sorting · 6e41b134
    Randall Leeds authored
    Make setupAnnotation into a tiny compatibility wrapper around a new
    method #anchor() method that returns a promise of the anchors. This
    is cleaner than trying to store the anchors on the annotation itself,
    which creates circular references, and it means there's no need to
    strip these properties when serializes annotations across the frame
    boundary.
    
    Sort annotations by TextPositionSelector in the widget display. This
    provides greater visual stability -- cards don't change positions
    after anchoring -- at the cost of potentially out of order cards when
    anchors have moved.
    6e41b134
cross-frame.coffee 2.05 KB