mbari-org / vars-annotation

Video Annotation Application for MBARI's Media Management (M3) software stack
https://docs.mbari.org/vars-annotation/
Apache License 2.0
16 stars 6 forks source link

VARS Integration Issue with Sharktopoda 2 - VARS echos back select, preventing a localization from being resized #142

Closed hohonuuli closed 1 year ago

hohonuuli commented 1 year ago

This is a VARS issue, not with Sharktopoda.

When a localization is selected in Sharktopoda, it sends the select localizations command. VARS selects it in it's own UI but responds back with its own select localizations command. This resets the state of the localization preventing it from being resized.

I think I just need to track the state of the last selected localizations from Sharktopoda. When VARS goes to select something, only send the select command if they are different than the last selected one from Sharktopoda.

hohonuuli commented 1 year ago

This is the log of events that occurs when a localiation is selected in Sharktopoda:

2022-12-27 20:40:16 [Thread-12                       ] DEBUG org.mbari.vcr4j.remote.player.PlayerIO              ANICCA.shore.mbari.org:5000 - Received command <<< {"command":"select localizations","localizations":["164d4e15-12ed-408e-b9b3-a9d4d696aee1"],"uuid":"f96c7275-7f75-48e2-8240-c8c9846b665f"}
2022-12-27 20:40:16 [Thread-12                       ] DEBUG org.mbari.vcr4j.remote.control.RVideoIO             f96c7275-7f75-48e2-8240-c8c9846b665f@localhost:8800 - Sending command >>> {
  "localizations": [
    "164d4e15-12ed-408e-b9b3-a9d4d696aee1"
  ],
  "command": "select localizations",
  "uuid": "f96c7275-7f75-48e2-8240-c8c9846b665f"
}
2022-12-27 20:40:16 [Thread-12                       ] DEBUG org.mbari.vcr4j.remote.control.RVideoIO             f96c7275-7f75-48e2-8240-c8c9846b665f@localhost:8800 - Received response <<< {"response":"select localizations","status":"ok"}
2022-12-27 20:40:16 [Thread-12                       ] DEBUG org.mbari.vcr4j.remote.control.RVideoIO             f96c7275-7f75-48e2-8240-c8c9846b665f@localhost:8800 - Sending command >>> {
  "localizations": [
    "164d4e15-12ed-408e-b9b3-a9d4d696aee1"
  ],
  "command": "select localizations",
  "uuid": "f96c7275-7f75-48e2-8240-c8c9846b665f"
}
2022-12-27 20:40:16 [Thread-12                       ] DEBUG org.mbari.vcr4j.remote.control.RVideoIO             f96c7275-7f75-48e2-8240-c8c9846b665f@localhost:8800 - Received response <<< {"response":"select localizations","status":"ok"}
2022-12-27 20:40:16 [Thread-12                       ] DEBUG org.mbari.vcr4j.remote.control.RVideoIO             f96c7275-7f75-48e2-8240-c8c9846b665f@localhost:8800 - Sending command >>> {
  "localizations": [
    "164d4e15-12ed-408e-b9b3-a9d4d696aee1"
  ],
  "command": "select localizations",
  "uuid": "f96c7275-7f75-48e2-8240-c8c9846b665f"
}
2022-12-27 20:40:16 [Thread-12                       ] DEBUG org.mbari.vcr4j.remote.control.RVideoIO             f96c7275-7f75-48e2-8240-c8c9846b665f@localhost:8800 - Received response <<< {"response":"select localizations","status":"ok"}
2022-12-27 20:40:16 [Thread-12                       ] DEBUG org.mbari.vcr4j.remote.player.PlayerIO              ANICCA.shore.mbari.org:5000 - Responding >>> {
  "response": "select localizations",
  "status": "ok"
}
hohonuuli commented 1 year ago

Resolved.