• Eduardo Sanz García's avatar
    Remove `AnnotationSync` utility · e63a0be7
    Eduardo Sanz García authored
    AnnotationSync utility didn't have a clear purpose, except for assigning a
    temporarily `$tag` to newly created annotations. For that, it used an
    internal cache of annotation objects from the Guest, that were mutated
    in-place. `AnnotationSync` used a very indirect method of communication
    to the `Guest`, using an event emitter, even though their mutual
    relationship was quite straightforward.
    
    In this PR, we have:
    
    * Simplified the messages that are sent between the host and the
      sidebar. We have assumed that a `$tag` value is always present if it
      comes from the `sidebar`, and a temporarily `$tag` is assigned in the
      `Guest` class for newly created annotations. Therefore, the type of
      the message sent between these two frames can be simplified to always
      be of the shape of `AnnotationData`, a safe version of `Annotation`.
    
    * Added a few missing types.
    
    * Changed the RPC method `deleteAnnotation` to send astring tag, similar
      to other RPC methods, like `focusAnnotations` or `scrollToAnnoation`.
      As a consequence of that we changed the `Guest#detach` method
      signature.
    e63a0be7
Name
Last commit
Last update
..
test Loading commit data...
activity.js Loading commit data...
annotations.js Loading commit data...
defaults.js Loading commit data...
direct-linked.js Loading commit data...
drafts.js Loading commit data...
filters.js Loading commit data...
frames.js Loading commit data...
groups.js Loading commit data...
links.js Loading commit data...
real-time-updates.js Loading commit data...
route.js Loading commit data...
selection.js Loading commit data...
session.js Loading commit data...
sidebar-panels.js Loading commit data...
toast-messages.js Loading commit data...
viewer.js Loading commit data...