Refactor anchoring interface and sorting
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.
Showing
Please register or sign in to comment