Closed hohonuuli closed 7 months ago
Got it working again. Note that deleting a bounding-box association in VARS does't propagate to Sharktopoda. The reason is:
OutgoingController.handle
method. It filters for bounding box associations. However, since it's deleted it doesn't find the localization uuid it needs to tell sharktopoda to drop it.AnnotationServiceDecoraor.refreshAnnotationsView(observationUuids)
. I should add an AssociationDeletedEvent that can be be picked up by the OutgoingController.A similar thing happens when editing the bounding box cords in VARS. They don't get propagated to Sharktopoda.
The fix has two parts in IncommingController.handleAdd
CreateAnnotationAtIndexWithAssociationCmd
from LocalizationController.EVENT_SOURCE
to anything else. This allows the OutgoingController to re-add the localization with the UUID generated by the database.
This is caused by https://github.com/mbari-org/annosaurus/pull/41. I think the root cause is that we can't set the uuid of objects before we create them in the database. They have to be created by the database's id generator now. We were setting an association's uuid (VARS) to be the localization's uuid (Sharktopoda) so that they match. But after creating the association in the database, it will have a different UUID, so the two apps have different UUIDS for the same object. The offending location in vars-annotation is LocalizedAnnotation.java:165:
Possible tasks: